Wits end - UnsatisfiedLinkError no jogl in java.library.path

I’m using jogl 1.1.1a. My program was actually working perfectly about 2 hours ago. It worked in class. Then I shut down, drove home, started up, and now it doesn’t work.

What gets me is that a sample program also using the same libraries does work.

I’m using Netbeans 6.7.1. It will compile and run just fine in the IDE. But when I build the jar, it does nothing. And yet it did just a few hours ago. I’ve been scouring the internet for hours looking for something helpful, but there’s nothing. Any help?

UnsatisfiedLinkError means it can’t find the native libraries. Put them in the working directory on Windows. Otherwise, put them in a directory and add -Djava.library.path=/path/to/directory to you VM arguments.

I should mention that I tried that. It didn’t work.

Well, that is how loading native libraries in Java works. If it didn’t work, you must have made a mistake.

Wait, you said “now it doesn’t work” and as a JAR “it does nothing”. Post errors if you get them, otherwise use System.out.println to determine where execution gets stuck.

It might not be the native libraries. If it works in your IDE and not in a jar, it might be the JOGL jars (gluegen-rt and jogl), which either have to be classpath’d or put in java.home/lib/ext.

Nah, it is the natives. It probably works in the IDE because of the Netbeans OpenGL Pack. Just do as Nate say: post full and precise error messages and the steps you took to produce them.

Well, I sorta solved it with advice I got from Reddit. Frankly, I have no idea how I did it. According to hours upon hours of research, I made absolutely no mistakes (I quintuple+ checked everything).

EDIT - Thanks for the suggestions though- forgot to say that.