I followed the instructions for downloading and using LWJGL on Mac OS X 10.4.2, but when I try to run the first sample application I get an error. I type:
java -cp .:res:jar/lwjgl.jar:jar/lwjgl_test.jar:jar/lwjgl_util.jar:jar/lwjgl_fmod3.jar:jar/lwjgl_devil.jar:jar/jinput.jar -Djava.library.path=native org.lwjgl.test.WindowCreationTest
...and I get the following output:
The following keys are available:
ESCAPE: Exit test
ARROW Keys: Move window when in non-fullscreen mode
L: List selectable display modes
0-8: Selection of display modes
F: Toggle fullscreen
SHIFT-F: Toggle fullscreen with Display.destroy()/create() cycle
Found 26 display modes
Problem retrieving mode with 640x480x24@75
Problem retrieving mode with 800x600x24@75
Problem retrieving mode with 1024x768x24@75
Exception in thread "main" java.lang.UnsupportedOperationException
at java.nio.IntBuffer.array(IntBuffer.java:903)
at org.lwjgl.opengl.MacOSXDisplay.setIcon(MacOSXDisplay.java:548)
at org.lwjgl.opengl.Display.setIcon(Display.java:855)
at org.lwjgl.test.WindowCreationTest.initialize(WindowCreationTest.java:126)
at org.lwjgl.test.WindowCreationTest.main(WindowCreationTest.java:320)
Anybody know what's going on here?
Thanks very much,
Greg
is that 0.98 ?
I know it's a bug thats fixed - caused by a direct/non-direct buffer issue
Yes, it's 0.98. At least, it's the file that I downloaded from:
http://easynews.dl.sourceforge.net/sourceforge/java-game-lib/lwjgl-macosx-0.98-1.zip
I've got this same exception with a 0.98 on Panther too.
this is a know bug, and has been fixed in cvs. I somehow thought that this was fixed in 0.98-1, but apparently this isn't the case.
It's a simple fix - but if you only use the binary distribution you will need a patch file until the next release.
I have created a patch file, please include in classpath BEFORE the lwjgl.jar:
http://lwjgl.org/osx_set_icon_patch.jar
Cheers.
Now I get:
Exception in thread "main" java.lang.UnsupportedClassVersionError: org/lwjgl/opengl/MacOSXDisplay (Unsupported major.minor version 49.0)
Is this because I'm only on Java 1.4.2?
doh - I have posted a new one
Hi, I have the same problem occuring as previous poster. I downloaded http://lwjgl.org/osx_set_icon_patch.jar and put in classpath before lwjgl.jar, but still have same problem occurring.
Can you point me in the right direction with this?
Thanks
Hmm, not sure whats going on then... sure it's the exact same error? - it should not be possible...
if it fails, you could try and surgically add the files from the patch file into lwjgl.jar, replacing the Mac display files in lwjgl.jar
i opened up lwjgl.jar and updated files, but it didn't help.
i got this following error:
The following keys are available:
ESCAPE: Exit test
ARROW Keys: Move window when in non-fullscreen mode
L: List selectable display modes
0-8: Selection of display modes
F: Toggle fullscreen
SHIFT-F: Toggle fullscreen with Display.destroy()/create() cycle
Found 36 display modes
Problem retrieving mode with 640x480x24@75
Problem retrieving mode with 800x600x24@75
Problem retrieving mode with 1024x768x24@75
Problem retrieving mode with 1024x768x32@75
Exception in thread "main" java.nio.BufferUnderflowException
at java.nio.DirectIntBufferU.get(DirectIntBufferU.java:221)
at java.nio.IntBuffer.get(IntBuffer.java:674)
at org.lwjgl.opengl.MacOSXDisplay.setIcon(MacOSXDisplay.java:552)
at org.lwjgl.opengl.Display.setIcon(Display.java:855)
at org.lwjgl.test.WindowCreationTest.initialize(WindowCreationTest.java:126)
at org.lwjgl.test.WindowCreationTest.main(WindowCreationTest.java:320)
i get the same error as the poster reported if i don't update files.
i'm on Mac mini running Mac OS X 10.4.3.
byte order issue?
http://metawire.org/~numberr/data/lwjgl.jar
i compiled it from cvs, and should include the fix to the problem.
it worked for me, at least.
so try it but make sure to use it just to confirm setIcon works or not.
after you have checked, just throw it away and wait for official release :)
Quote from: "numberR"http://metawire.org/~numberr/data/lwjgl.jar
i compiled it from cvs, and should include the fix to the problem.
it worked for me, at least.
Yes, it works. Thanks!