Login  Register

Re: Trying to learn how to use jogl. Need help!

Posted by Wade Walker on Aug 30, 2014; 6:48pm
URL: https://forum.jogamp.org/Trying-to-learn-how-to-use-jogl-Need-help-tp4032957p4032988.html

Your files are both in the default package (since they have no "package" statement at the top), which means you can't put them in a subdirectory, because Java interprets the subdirectories as package names. You should either put your *.java files in the top directory (above "lib") or add a "package" statement to them and put them in the appropriate subdirectory (for example, if you put "package my.name.here;" at the top of both files, you'd put them both in the subdirectory "my/name/here", and you'd run by saying "java -classpath "lib/jar/gluegen-rt.jar:lib/jar/jogl-all.jar" my.name.here.OneTriangleSwingGLJPanel").

Use of the default package is not encouraged, I just didn't use a package in the examples because people normally already have a package that they want to put their files into.