jME 2.0.1 under Mac OS 10.6 ... fails

I don't know how else to describe it, I can't get jME 2 to do anything. I keep getting this singularly unhelpful error:


java.lang.UnsatisfiedLinkError: /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/liblwjgl.jnilib:  no suitable image found.  Did find:  /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries/liblwjgl.jnilib: no matching architecture in universal wrapper
   at java.lang.ClassLoader$NativeLibrary.load(Native Method)
   at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1878)
   at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1779)
   at java.lang.Runtime.loadLibrary0(Runtime.java:823)
   at java.lang.System.loadLibrary(System.java:1045)
   at org.lwjgl.Sys$1.run(Sys.java:72)
   at java.security.AccessController.doPrivileged(Native Method)
   at org.lwjgl.Sys.doLoadLibrary(Sys.java:65)
   at org.lwjgl.Sys.loadLibrary(Sys.java:81)
   at org.lwjgl.Sys.<clinit>(Sys.java:98)
   at org.lwjgl.opengl.Display.<clinit>(Display.java:129)
   at com.jme.system.lwjgl.LWJGLPropertiesDialog$ModesRetriever.run(LWJGLPropertiesDialog.java:682)
   at com.jme.app.AbstractGame.getAttributes(AbstractGame.java:252)
   at com.jme.app.BaseGame.start(BaseGame.java:67)
   at jmetest.scene.TestPassNode.main(TestPassNode.java:62)


I have the lwjgl natives set up correctly, I even downloaded the distribution from the lwjgl site and used those.
If i try to force it to use the 32-bit JRE, i get a version mismatch error. If i forcibly replace the liblwjgl.jnlib in the VM it blows up. I can't think of anything else to try.
Can anyone help?

Can you please give more details, so, you use JDK 6 on a 64 bit Mac with Mac OS X 10.6, right?

I use 32-bit and 10.5, and that combo works with jME 2.0.1.



Which files for lwjgl and jinput did you use? Are you sure they are mac 64bit versions?



http://ariejan.net/2009/09/01/jinput-mac-os-x-64-bit-natives/

No joy with those alternate natives. :frowning:



Yes, i'm using JDK6 on a 64-bit intel iMac, running 10.6.1.



I'm using Eclipse, which I forgot to mention.

I've gotten past that error, or superseded it, there's no way to tell, by deleting the liblwjgl.dnlib in my Java insallation. I'm now getting the

Native library not set - go to
http://www.jmonkeyengine.com/wiki/doku.php?id=no_lwjgl_in_java.library.path
for details.
java.lang.UnsatisfiedLinkError: no lwjgl in java.library.path


error message, even though I've pointed the lwjgl JARs to their natives.  :|

Ok, i copied over the new version of the "liblwjgl.dnlib" to my installation, now i'm getting the seemingly SWT related

2009-10-28 10:17:08.020 java[71632:903] [Java CocoaComponent compatibility mode]: Enabled
2009-10-28 10:17:08.051 java[71632:903] [Java CocoaComponent compatibility mode]: Setting timeout for SWT to 0.100000
2009-10-28 10:17:15.236 java[71632:c303] *** -[NSConditionLock unlock]: lock (<NSConditionLock: 0x136f85ae0> '(null)') unlocked when not locked
2009-10-28 10:17:15.236 java[71632:c303] *** Break on _NSLockError() to debug.
2009-10-28 10:17:15.237 java[71632:c303] *** __NSAutoreleaseNoPool(): Object 0x100621a00 of class NSCFNumber autoreleased with no pool in place - just leaking
2009-10-28 10:17:15.338 java[71632:c303] *** -[NSConditionLock unlock]: lock (<NSConditionLock: 0x136eb8740> '(null)') unlocked when not locked
2009-10-28 10:17:15.338 java[71632:c303] *** Break on _NSLockError() to debug.
2009-10-28 10:17:15.440 java[71632:c303] *** -[NSConditionLock unlock]: lock (<NSConditionLock: 0x136f866b0> '(null)') unlocked when not locked
2009-10-28 10:17:15.441 java[71632:c303] *** Break on _NSLockError() to debug.
2009-10-28 10:17:15.572 java[71632:c303] *** -[NSConditionLock unlock]: lock (<NSConditionLock: 0x136eb90f0> '(null)') unlocked when not locked
2009-10-28 10:17:15.573 java[71632:c303] *** Break on _NSLockError() to debug.
2009-10-28 10:17:15.674 java[71632:c303] *** -[NSConditionLock unlock]: lock (<NSConditionLock: 0x136f86fd0> '(null)') unlocked when not locked
2009-10-28 10:17:15.674 java[71632:c303] *** Break on _NSLockError() to debug.
2009-10-28 10:17:15.783 java[71632:c303] *** -[NSConditionLock unlock]: lock (<NSConditionLock: 0x100117320> '(null)') unlocked when not locked
2009-10-28 10:17:15.784 java[71632:c303] *** Break on _NSLockError() to debug.
2009-10-28 10:17:15.886 java[71632:c303] *** -[NSConditionLock unlock]: lock (<NSConditionLock: 0x136eb9530> '(null)') unlocked when not locked
2009-10-28 10:17:15.886 java[71632:c303] *** Break on _NSLockError() to debug.
2009-10-28 10:17:15.987 java[71632:c303] *** -[NSConditionLock unlock]: lock (<NSConditionLock: 0x136eb96e0> '(null)') unlocked when not locked
2009-10-28 10:17:15.988 java[71632:c303] *** Break on _NSLockError() to debug.
2009-10-28 10:17:16.089 java[71632:c303] *** -[NSConditionLock unlock]: lock (<NSConditionLock: 0x136eb9890> '(null)') unlocked when not locked
2009-10-28 10:17:16.089 java[71632:c303] *** Break on _NSLockError() to debug.
2009-10-28 10:17:16.191 java[71632:c303] *** -[NSConditionLock unlock]: lock (<NSConditionLock: 0x136eb9a90> '(null)') unlocked when not locked
2009-10-28 10:17:16.191 java[71632:c303] *** Break on _NSLockError() to debug.


But i get that whether or not i use the swt_fake.jar or the latest (cocoa-compatible) SWT from the Eclipse site.
:?
Gaagh!

I'm going to just ignore the lock error and chalk it up to "don't muck around with your java installation"



I've discovered that i get the same error trying to run the LWJGL test. hmm.

tigerAspect said:

I'm going to just ignore the lock error and chalk it up to "don't muck around with your java installation"

I've discovered that i get the same error trying to run the LWJGL test. hmm.


Take jme-swt.jar out of your class path :)  That's a known issue with OS X

are you sure you a re using the newest swt lib for mac?

Also i suggest checking your lwjgl version. (does jogl work btw?)

Yay! It … sort of works!



So, by removing all swt (including jme-swt.jar) JARs and using swt_fake, combined with forcibly replacing the liblwjgl.dnlib in the Java installation with the newest version (I downloaded the latest from the lwjgl site and used the JARs too), it works.



That's messed up. Why would it be insisting on using the native library in the Java installation?



So, there's still no swt support for Mac OS X? I downloaded the latest version, added that in instead of swt_fake, and it blows up with the lock error. That's really bizarre, the latest version of swt was supposed to add Cocoa compatibility. Anyone know what's going on?

I too am interested in any compatibility issues with OS X. I'm developing on windows at the moment but would like to avoid any pitfalls for making the switch to OS X.

For me, everything works on SnowLeopard as it did in Leopard by going to Utilities->Java Preferences and choosing 32bit Java as the preferred one.

The LWJGL binaries that come with jme2 currently are only 32bit. If you need 64bit, get the newest version of LWJGL from their site.

SWT/Swing of course is always a problem because of the special Java UI implementation by Apple, don't know about the status, maybe it works by getting all the newest libs…