No JOGL in java.libary.path

“no JOGL in java.library.path”

I used to get this error when I didn’t properly set my environmental variables in WinXP.

How might I prevent this error in the future if I wished to copy my JOGL projects onto another machine where I did not have permission to change the environmental variables?

An extention of this problem would be how to properly setup Java Web Start for a program that uses jogl.jar- my efforts in the past have still required me to manually change the Window’s environmental variables. However, I don’t want to require people to do this. I want it to be seemelss like I’ve seen in other applications yet, I don’t know how they achieved it.

Let’s say you have a deliverable project structure as follows:

data (dir containing project data)
lib (dir containing required .jar and .dll (or .so) files)
start.bat (startup script)

You could set the path when invoking the JVM like this (in start.bat):

java -Djava.library.path=lib MyClass

the actual command line option is

java -Djava.library.path="path/to/libraries" MyClass

this usually worked fine on my os x machine, except when having older jni-libraries in default locations, which will then be taken first.

For JNLP setting java.library.path by hand is not needed because this is the task of the JNLP client (e.g. Webstart). however you are required to set up certain parts of the JNLP descriptor (the XML which describes your application) right. for ruther info have a look here:
http://java.sun.com/j2se/1.4.2/docs/guide/jws/developersguide/syntax.html

I good starting point are other’s jnlp descriptors. eg:
http://www.puppygames.net/downloads/alienflux-full.jnlp

hi Funkapotamus !

howto webstart + native libs ?
native libs are wrapped in signed jar files !

here is a part of my jnlp-jogl-test-file:
http://filebee.org/test/jogl2/joglTests2.jnlp

<resources>
   <j2se version="1.4+"/>
        <jar href="bin/joglTest11.jar" main="true" />
        <jar href="bin/sound/jl0.4.jar"  />
 </resources>

<resources os="Windows">
    <jar            href = "bin/jogl2-windows/jogl2-windows.jar" />
        <nativelib  href = "bin/jogl2-windows/jogl2-windows-native.jar"/>
</resources>

<resources os="Linux">
    <jar            href = "bin/jogl2-linux/jogl2-linux.jar" />
        <nativelib  href = "bin/jogl2-linux/jogl2-linux-native.jar"/>
</resources>

resource tags are OS specific.
note: the jar files must be signed if you wish to read/write files or load native libs.
for example “jogl2-windows.jar” has “jogl.dll” in it.

hope this helps & wich you good code,
olaf

http://filebee.org/en/test/index.html