Login  Register

Re: ZipException / classpath problem with jocl trying to run HelloJOCL

Posted by gouessej on Nov 20, 2013; 8:39am
URL: https://forum.jogamp.org/ZipException-classpath-problem-with-jocl-trying-to-run-HelloJOCL-tp4030658p4030661.html

Hi

You shouldn't set the Java library path, it isn't required in your case as the JARs containing native libraries are in the same directory than the JARs containing Java libraries.

Moreover, why do you use "-jar"? You should use "-cp" or "-classpath". Please read the "man" (about -jar):
http://www.manpagez.com/man/1/java/
other user class path settings are ignored
Please follow our instructions:
http://jogamp.org/wiki/index.php/Setting_up_a_JogAmp_project_in_your_favorite_IDE#Compile_and_run_your_project_from_the_command_line

Edit.: Please ensure you haven't put any JogAmp JARs into the JVM and that you haven't installed JOGL as an extension.

Edit.2: It should work:
java -classpath "/Users/nyholku/JoclTests/jogamp-all-platforms-v2.1.1/jar/gluegen-rt.jar:/Users/nyholku/JoclTests/jogamp-all-platforms-v2.1.1/jar/jocl.jar:." com.jogamp.opencl.util.CLInfo

Replace the "." by the directory containing your .class file.

Edit.3: Under Eclipse, don't forget the "exported" flag:
http://svn.code.sf.net/p/tuer/code/pre_beta/.classpath
Julien Gouesse | Personal blog | Website