Bug 1275 - Jogl-2.3.2 - FreeBSD - Building from source : swt.jar version mismatch
Summary: Jogl-2.3.2 - FreeBSD - Building from source : swt.jar version mismatch
Alias: None
Product: Jogl
Classification: JogAmp
Component: swt (show other bugs)
Version: tbd
Hardware: pc_x86_64 bsd
: P4 normal
Assignee: Petros Koutsolampros
Depends on:
Reported: 2015-12-24 14:34 CET by Valery
Modified: 2019-03-29 13:58 CET (History)
1 user (show)

See Also:
SCM Refs:
Workaround: ---


Note You need to log in before you can comment on or make changes to this bug.
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


* 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

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