Jonas Kemper
Jonas Kemper

Reputation: 3935

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;
                         ^

Upvotes: 1

Views: 3070

Answers (2)

Chi
Chi

Reputation: 55

try to replace javax.media by com.jogamp

Upvotes: 2

olamedia
olamedia

Reputation: 188

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

Upvotes: 1

Related Questions