Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: JNI crashing during initialization




On Mar 29, 2006, at 10:35 AM, Benjamin Rutt wrote:

Ray Swartz <email@hidden> writes:

Have you tried changing JNI_VERSION_1_2 to JNI_VERSION_1_4?

I did think of that after reading some of the archives yesterday,
perhaps that will fix it.  I'm going to try that as soon as the
powerbook I've been testing on is back on our network for me to use
(my coworker's laptop, he'll be back tomorrow).

Actually, that will make a huge difference -- a JNI_VERSION_1_2 tells JavaVM.framework to load Java 1.3.1, which is probably not what you want anyway.

Since you are on 10.4, you can ensure which VM will be used by setting the environment variable JAVA_JVM_VERSION to the version you want before you call JNI_CreateJavaVM. It's a string in the format used by JVMVersion in the Java dictionary of an application's Info.plist -- '1.4*', '1.4+', '1.5', etc.

I'm a bit concerned that your app is crashing as is, though. If you can file a bug and include your project (if possible) we can have a look. But if you use setenv("JAVA_JVM_VERSION", "1.4*", 1) you should be fine.

Scott

------------------
Scott Kovatch
Apple Computer
Java Runtime Classes
Cleveland Hts, OH
email@hidden

I am Scott Kovatch, and I approved this message.

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden

This email sent to email@hidden

References: 
 >JNI crashing during initialization (From: Benjamin Rutt <email@hidden>)
 >Re: JNI crashing during initialization (From: Benjamin Rutt <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.