java-dev

[Prev] Thread [Next]  |  [Prev] Date [Next]

Re: jni problems ? Greg Guerin Tue Jun 23 17:00:37 2009

Lars Gustafsson wrote:

I have tried the -d32 option & I have J2SE 5.0 32 bits selected as my preferred JVM,
but still the same error.


First, exactly how is your app being launched:
  1. command-line.
  2. double-clicked jar.
  3. bundled app (CoolNameHere.app).

Second, if your app is a bundled app, what value (if any) does the JVMVersion key in the Java dictionary of Info.plist have? If it's 1.6 + or 1.6*, there is no 32-bit JVM for that, so make sure you're requesting 1.5*. Your choice of preferred JVM can't make an app that says it needs 1.6 run under the 1.5 JVM.

Third, I suggest logging exactly which JVM is actually launching. Print the values of the following system properties to the System.err stream: "java.version", "os.arch", and "sun.arch.data.model". Do this early in main(), preferably before any static initializers in any other classes run, because static initializers frequently load JNI libs, and that is obviously failing. For a bundled app, the System.err stream will appear in the console.log of Console.app, located under /Applications/Utilities/.

  -- GG

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      ([EMAIL PROTECTED])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/alexiscircle%40gmail.com

This email sent to [EMAIL PROTECTED]