Hi,

yesterday, I attempted to install the latest SmartGit release on my FreeBSD (10.2) and, being written in Java, it should work. But when I run the boot script I get these exceptions:

Code:
Error invoking SmartGit
java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at QBootLoader.main(SourceFile:117)
Caused by: java.lang.NoClassDefFoundError: org/eclipse/swt/widgets/Display
        at com.syntevo.q.gui.cB.a(SourceFile:53)                                                                                                                        
        at smartgit.adI.a(SourceFile:90)                                                                                                                                
        at smartgit.avS.a(SourceFile:256)                                                                                                                              
        at smartgit.avS.a(SourceFile:208)                                                                                                                              
        at smartgit.aeg.b(SourceFile:61)
        at SmartGit.main(SourceFile:11)
        ... 5 more
Caused by: java.lang.ClassNotFoundException: org.eclipse.swt.widgets.Display
        at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)

Searching by Google, I found I need the jar file of the SWT framework for FreeBSD. I installed the package with pkg install swt, copied the corresponding jar file for my architecture to the smartgit's 'lib' directory and added this line to the smartgit's boot script, just before the last line (I'm attaching the boot script):

Code:
_VM_PROPERTIES="$_VM_PROPERTIES-Dswt.jar=$SMARTGIT_HOME/lib/org.eclipse.swt_3.104.1.v20150825-0743.jar"

I still get the same exceptions I pasted above. Any idea for make it work on FreeBSD? I think it would be really cool to port SmartGit to FreeBSD. Many thanks.
 

Attachments

  • smartgit.txt
    3.8 KB · Views: 601
I'm able to make it work by copying/linking swt.jar:
cp /usr/local/share/java/classes/swt.jar lib/org.eclipse.swt.gtk.freebsd.x86_64.jar

being written in Java, it should work
The surprising truth about Java is that it often doesn't or only partially.
 
I'm able to make it work by copying/linking swt.jar:
cp /usr/local/share/java/classes/swt.jar lib/org.eclipse.swt.gtk.freebsd.x86_64.jar


The surprising truth about Java is that it often doesn't or only partially.

Are you able to make it work just copying the jar? Or did you need to modify the boot script? I don't know if you have done a fresh install right now and have just copied the jar or if you had done some changes before. Thanks.
 
Unfortunately, installing x11-toolkits/swt-devel and copying
Code:
/usr/local/share/java/classes/swt-devel.jar
as

Code:
cp /usr/local/share/java/classes/swt-devel.jar lib/org.eclipse.swt.gtk.freebsd.x86_64.jar

does not work any more with FreeBSD 11.0-RELEASE-p9 and SmartGit 17.0.3

Code:
smartgit % bin/smartgit.sh
Outdated SWT version detected! Aborting.

Using SmartGit 8.0.4 still works, although it is not supported anymore.
 
Back
Top