Bug 1275

Summary: Jogl-2.3.2 - FreeBSD - Building from source : swt.jar version mismatch
Product: [JogAmp] Jogl Reporter: Valery <valery>
Component: swtAssignee: Petros Koutsolampros <pjgl>
Status: UNCONFIRMED ---    
Severity: normal CC: gouessej
Priority: P4    
Version: tbd   
Hardware: pc_x86_64   
OS: bsd   
Type: DEFECT SCM Refs:
Workaround: ---

Description Valery 2015-12-24 14:34:33 CET
* env: FreeBSD-10.2 AMD64, OpenJDK Runtime Environment (build 1.8.0_45-b14)

* Goal : building jogl for processing-3.0.1 for my freebsd box.

* Building jogl from source leads to an error :
>>
jogamp-2.3.2/jogl/src/newt/classes/jogamp/newt/swt/event/SWTNewtEventFactory.java:157: error: cannot find symbol
case com.jogamp.newt.event.KeyEvent.VK_SPACE         : return SWT.SPACE
<<

* Description : 
1) swt.jar version is too old (365) and SWT.SPACE exists from swt-3.7 only
2) jogamp-2.3.2/jogl/make/lib/swt/gtk-freebsd-x86_64/README.txt is wrong too : show 'version 3.7.1', but the swt.jar in the same dir is actually '3.6.5'

* Fixing / Workarround (short) :
1) compile x11-toolkits/swt-devel from the FreeBSD ports tree (3.7.1)
2) get swt-devel.jar from the ports working directory and add every *.so library to it (see the swt.jar contents from jogl source)
3) mv jogl/make/lib/swt/gtk-freebsd-x86_64/sw.jar to swt.jar.orig (or delete it)
4) copy the swt-devel.jar from the working ports directory to jogl/make/lib/swt/gtk-freebsd-x86_64/swt.jar
5) re-run ant

==> BUILD SUCCESSFUL


* A small word to the jogamp team : 
- please, remove the bad swt.jar from your sources (and perhaps fix the README.txt too), it has the wrong version.
This error is here since (at least) 2.1 ... (i didn't open a bug ..)
Perhaps leaves this 'howto' instead of the README.txt ..
Many thanks to you,

--
Valéry Seys
Paris /\
Comment 1 Julien Gouesse 2016-02-16 19:53:07 CET
Hi

I can use the same swt JAR than in JogAmp's Ardor3D Continuation, it should work.