简体   繁体   中英

JOGL program does not compile - javac with classpath

I want to run a HelloWorld JOGL programm on the commandline. I downloaded the .jars from jogamp.org and put the

gluegen-rt.jar , 
jogl.all.jar , 
gluegen-java-src.zip , 
jogl-java-src.zip , 
gluegen-rt-natives-macosx-universal.jar , 
jogl-all-natives-macosx-universal.jar 

in a directory "jar" in my HelloWorld folder - as described in http://jogamp.org/wiki/index.php/Downloading_and_installing_JOGL .

Now I try to compile with

javac -classpath "jar/gluegen-rt.jar:jar/jogl.all.jar" HelloWorld.java 

as described on https://jogamp.org/wiki/index.php/Setting_up_a_JogAmp_project_in_your_favorite_IDE .

Then it throws me 14 errors starting with

HelloWorld.java:7: package javax.media.opengl does not exist
import javax.media.opengl.GL;
                         ^

When I try to compile with absolute paths using

javac -classpath "/Users/jonas/Desktop/cool_jogl/helloworld/jar/gluegen-rt.jar:/Users/jonas/Desktop/cool_jogl/helloworld/jar/jogl-all.jar" HelloWorld.java 

it still throws me 12 errors starting with

HelloWorld.java:9: cannot find symbol
symbol  : class GLCanvas
location: package javax.media.opengl
import javax.media.opengl.GLCanvas;
                         ^

尝试用com.jogamp替换javax.media

You should use javax.media.opengl.awt.GLCanvas Some package names was changed. Use IDE autocomplete or look sources.zip to find new names.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM