Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: Java version
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Java version



On Jun 16, 2009, at 3:23 PM, Piotr Rychlik wrote:

Hi,

I have just updated my Java via Software Update.
In my program the currently used Java version is displayed in the about box. I am using System.getProperty("java.version") and System.getProperty("sun.arch.data.model") to collect this information.
I specified 1.4+ as the target VM version, and I set version 1.4.2 as the most appropriate version of the Java VM to use in the Java Preferences panel.
Surprisingly my program always starts with the 64-bit VM (version 5 or 6 depending which one is placed higher in the preference list).
Command java -version returns expected version number, i.e. 1.4.2.


My program uses universal JNI library compiled for 32 and 64-bit architectures.

Isn't that strange?

Nope, new policy. We only select a Java version that is compatible with the architecture your app has launched as.


Try checking the "Run in 32-bit mode" checkbox in the Get Info window of your app in the Finder.

If you want that checkbox checked by default, check out the LSArchitecturePriority section of the Launch Services release notes <http://developer.apple.com/releasenotes/Carbon/RN-LaunchServices/index.html >. If you don't support 64-bit at all, strip the x86_64 slice out of the JavaApplicationStub before you copy it into your app bundle.

Hope this explains what you are seeing,
Mike Swingler
Java Runtime Engineer
Apple Inc.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Java version (From: Piotr Rychlik <email@hidden>)



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

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.