Now this might be JOGL or Mac Java 7 problem so I will be
pestering those lists too but this is so confusing that
I want to left no stone interned…
Ok, to the business, here it the weirdest thing that
has been bothering me on and off for a few weeks.
I'm developing an application that uses OpenGL via
JOGL. I package it using one-jar and then use launch4j
and appbundler to turn it into a .exe and .app file/bundle.
I'm pretty sure this was working flawlessly some months ago,
I might believe I had dreamed but there is this dialog
from my in the web so I must have had it working previously:
Anyway, now all of a sudden when I came back to this
project after summer, the .app refused to start, it launched
and but nothing happened. Starting from Terminal I saw
that it had trouble loading jnilib's for JOGL.
In the interim time what has changed is that I've upgraded
to Java 7 and Mountain Lion (and Retina MacBook Pro).
Figuring this might be that JOGL/jogamp or one-jar had gone stale
I've upgraded to the latest.
Now here were it gets confusing.
In Eclipse, to be able to launch the app it is enough to include:
in the project build path. Works like a charm.
To be able to use one-jar I need to include not only:
but the native libraries unpacked from the jar:
and interestingly/confusingly these need to be .dylib
not .jnilip although the jogamp distrubutes them as
.jnilib and apparently Eclipse can figure this out
when those files are in the gluegen-rt-natives-macosx-universal.jar
What's going on?
Anyway with above I can get one-jar to produce a single
jar that works fine, apart from having the correct process
name for the application and a nice icon.
So I apply appbundler to that jar and turn it into a .app bundle
and again I'm back where I started:
Loading configuration from /Users/nyholku/EazyCNC/EazyCNC-Mach-Config.ecnc
Catched UnknownHostException: Users, while TempJarCache.bootstrapNativeLib() of jar:file://Users/nyholku/EazyCNCProject/bin/EazyCNC.app/Contents/Resources/Java/EazyCNC.jar!/lib/gluegen-natives-macosx-universal.jar!/ (file://Users/nyholku/EazyCNCProject/bin/EazyCNC.app/Contents/Resources/Java/EazyCNC.jar!/lib/ + gluegen-natives-macosx-universal.jar)
Caused by: java.lang.UnsatisfiedLinkError: no gluegen-rt in java.library.path
So several weird things going on here, any ideas to go forward would
Why Eclipse works with just the .jar files and/or why
the one-jar classloader does not?
Should the native libraries be .jnilib or .dylib? I've
always used .jnilib when I've called native code from Java?
Why the appbundler packaged working .jar fails to load
the native libraries?
PS for reference, here is what I've got in my one-jarred .jar file
nyholkujar tf EazyCNC.jar
Log in to post a comment.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.