java.lang.UnsatisfiedLinkError: no lwjgl in java.library.path
What the fuck is that.
Seriously.
I have lwjgl.jar added to the classpath. What does it want from me? Can a jigga get a install.txt? 
java.lang.UnsatisfiedLinkError: no lwjgl in java.library.path
What the fuck is that.
Seriously.
I have lwjgl.jar added to the classpath. What does it want from me? Can a jigga get a install.txt? 
Thatās the DLL itās looking for.
Add -Djava.library.path= to your commandline. Or simply ensure that the lwjgl.dll is in the current working directory when you fire up a jar, say. Donāt forget to put OpenAL32.dll in there as well if youāre doing sound.
Cas 
I couldnāt get the command line to work in eclipse for whatever reason ( Edit: yay i got it working in eclipse ) so I just put the .dlls in the dir.
Now I get -
java.lang.Exception: The keyboard could not be created.
at org.lwjgl.input.Keyboard.create(Unknown Source)
at Test2D.init(Test2D.java:116)
at Test2D.main(Test2D.java:70)
No window
Thanks cas.
[quote] java.lang.Exception: The keyboard could not be created.
at org.lwjgl.input.Keyboard.create(Unknown Source)
at Test2D.init(Test2D.java:116)
at Test2D.main(Test2D.java:70)
No window
[/quote]
Well that is actually a good exception message
- the error:
No Window
You need to create a GL instance (which inherits from Window) BEFORE creating the Keyboard.
My GL creation isnāt throwing any exceptions and itās being created before the keyboard. My code is like a copy of whatās up on the LWJGL page modified for .6.
Do you see anything wrong with this line?
gl = new GL( āTest2Dā, 0, 0, 640, 480, 16, 0, 0, 0 );
are you calling gl.create() too?
Oh crap.
Well, problem is, I read a post explaining the changes (i think it was acually from you) and I for whatever reason just assumed that was a complete change and it was the ONLY thing I had to do. My bad.
You guys really need to update your page.
Edit: Sonofabitch. Now it works.
Thanks.
[quote]You guys really need to update your page.
[/quote]
Indeed, but Real Life is intefering sometimes :-/
One of my main goals for 0.7, is a general cleanup in the API and documentation (or lack thereof)
No plan survives first contact with Real Life ā¢.

Just thought I would note that you can also drop the dlls into \jre\bin or your windows system directory and any code you write will be able to find it. This allows you to skip the -Djava.library.path and/or copying the dlls from one project to the next.
Of course, youāll still have to be aware of what to do with the dlls when you redistribute, in which case simply keeping them in the same directory as the jar file is probably preferable to dropping them into a system directory.
I strongly advise not doing this though, as youāll be in for a world of pain and incompatibility. Just plonk the dlls in the same place as your current project and use the -D. Itāll save you grief later, when we break the API 
Cas 
Weāre already in a world of pain and incompatibility when you break the API. Whatās one more step of copying the dlls? 
I guess I donāt mind replacing the entire lib system wide like this since itās exactly what I have to do in Linux anyway. Thereās no ājust drop the .so into the same directory as the jarā there yet. (And I strongly hope the emphasis there is on the yet.)
Should I be able to export my project to a jar in eclipse, copy lwjgl.dll to the dir where the jar is, and then be able to just double click the jar?
Double clicking it seems to have no effect right now.
In order to have a jar file do something when you double-click it, you have to set the āMain-classā property in the manifest. Now, Iām not sure how eclipse builds jar files, I usually do mine by hand or use Ant. Anyway, hereās a little reference on what Iām talking about:
http://java.sun.com/docs/books/tutorial/jar/basics/run.html
Look towards the bottom for the section labeled āJar files as applicationsā.
-Paul
Main class is set. Itās in the last dialog of eclipseās export thingy. Thatās why Iām a bit confused that Iām getting nothing. I tried it 2 times making SURE that was set.
Edit: Lemme just say that I have exported to jar files before and everything worked great, but the only difference I see here is the lwjgl stuff.
But Iām an idiot so who knows. 
Unfortunately double-clicking the jar file doesnāt give any output when something goes wrong. Try opening a dos prompt to the directory and using the command:
java -jar myjarfile.jar
This is pretty much the same as double-clicking, but hopefully any errors will spew out onto the screen instead of being hidden.
bedelf:
Just for clarification, are you trying to double click the lwjgl.jar or a jar with your code that you generated?
Oh, duh.
C:\Test2D>java -jar Test2d.jar
java.lang.NoClassDefFoundError: org/lwjgl/opengl/GL
at Test2D.init(Test2D.java:103)
at Test2D.main(Test2D.java:37)
Exception in thread āmainā java.lang.NoClassDefFoundError: org/lwjgl/input/Keybo
ard
at Test2D.cleanup(Test2D.java:124)
at Test2D.main(Test2D.java:49)
Now the question is, whatās the best way to solve that.
Edit: acually lemme rephrash, I guess my question is, if I was gonna send my jar to someone else, whats the easiest way for them to get this working.
Two options:
Plop lwjgl.jar into /lib/ext where is the JRE directory. (i.e. c:\Program Files\Java\1.4\lib\ext or c:\j2sdk1.4\jre\lib\ext)
Use the snazzy manifest features! Simply create a Manifest like this:
Main-Class: com.whatever.MyClass
Class-Path: lib/lwjgl.jar lib/timer.jar
Then package your Jar with ājar -cvmf mymanifest.mf myjar.jar com/whatever/*.classā
For distribution, you should create a zip file with a packing list simialr to this:
myjar.jar
lwjgl.jar
lwjgl.dll
openal.dll
That way when they unzip it, they can simply double click on myjar.jar. The Shooter example over on the GAGE homepage uses this. You could even pack your program into an NSIS installer and have it automatically generate start menu icons to your JAR file. Just make sure you set the working directory right or it wonāt be able to find lwjgl.jar.
Iām not having any luck so far, I keep getting
Failed to load Main-Class manifest attribute from
Test2D.jar
But itās in there, tried it 100 ways. Iām looking at the Manifest docs but itās not telling me anything I donāt already know.
Has anyone done this from eclipse?