I've looked around and I can't seem to figure this out. I'm trying to setup JOGL(on win64) for use with IntelliJ IDEA and it doesn't seem to work no matter what I do. Here's what I've done so far:
- Downloaded this
- Moved all of these files into their own folder(called JOGL):
- gluegen-rt.jar
- jogl-all.jar
- gluegen-java-src.zip
- jogl-java-src.zip
- gluegen-rt.dll
- jogl_desktop.dll
- nativewindow_awt.dll
- nativewindow_win32.dll
- newt.dll
- Went to Project structure and added the JOGL folder to the module as a library
- Attempted to run the module with the import:
import net.java.games.jogl.*;
added
I also attempted to run the line of code System.loadLibrary("jogl");
without using the import, and it didn't work. Any help is appreciated.
These are the guides I was following:
- http://jogamp.org/wiki/index.php/Downloading_and_installing_JOGL
- http://jogamp.org/wiki/index.php/Setting_up_a_JogAmp_project_in_your_favorite_IDE
Edit:
As per CrazyCoder's request, when I attempt to compile with the import net.java.games.jogl.*;
that I mentioned, I get:
java: C:\....\Main.java:2: package net.java.games.jogl does not exist
When I remove the import and attempt to run it with the System.loadLibrary("jogl");
line inserted, I get:
Exception in thread "main" java.lang.UnsatisfiedLinkError: no jogl in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1738)
at java.lang.Runtime.loadLibrary0(Runtime.java:823)
at java.lang.System.loadLibrary(System.java:1028)
at core.Main.main(Main.java:15)
Strangely, when I try to run it on the command line with the command java -cp "/cygdrive/c/apps/JOGL/" core.Main
I get:
java.lang.NoClassDefFoundError: core/Main
Caused by: java.lang.ClassNotFoundException: core.Main
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
Could not find the main class: core.Main. Program will exit.
Exception in thread "main"
Where if I don't run it with the -cp "/cygdrive/c/apps/JOGL/"
, it works fine (as in, actually runs and gives me the same results as the IDE, but also fails in the same ways).
Below is a screenshot of my module's dependencies(JOGL is what I mentioned it was above):
I tried to separate everything to make it more readable, sorry if it's difficult to follow.