facebook

Specifying JDK/VM when running on OS X (Leopard)

  1. MyEclipse IDE
  2.  > 
  3. Installation, Configuration & Updates
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #281298 Reply

    dnedrow
    Member

    I have both the stock VMs installed (1.4 and 5), as well as the 64-bit only JDK 6. I have 6 set as my default version for apps and console, but I clearly need to force Eclipse to run using 5 in 32bit mode (as Eclipse doesn’t, and won’t anytime soon, support the 64-bit VM on the Mac).

    I’m sure in the past, this was simply a matter of adding the following to the Eclipse section of the root dictionary in the info.plist file:

    
    <string>-vm</string>
    <string>/System/Library/Frameworks/JavaVM.framework/Versions/1.5/Commands/java</string>
    

    However, this doesn’t appear to work at the error dialog displayed at Eclipse startup shows -vm pointing to the default system VM (which is 6).

    Any ideas out there?

    -David

    #281320 Reply

    Loyal Water
    Member

    This change has to be made in the eclipse.ini file. To get at the eclipse.ini file you need to right click on your Eclipse executable, do “Show Contents” then drill down to the Mac OS folder which should contain your eclipse.ini file inside.

    You will have to point the -vm argument to your javaw.exe .

    #281796 Reply

    dnedrow
    Member

    @support-nipun wrote:

    This change has to be made in the eclipse.ini file. To get at the eclipse.ini file you need to right click on your Eclipse executable, do “Show Contents” then drill down to the Mac OS folder which should contain your eclipse.ini file inside.

    You will have to point the -vm argument to your javaw.exe .

    I’ve tried as many variations of this in the eclipse.ini as I can think of.

    Should it be as simple as adding the following to the ini file…

    
    -vm
    /System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home/bin/java
    
    #281867 Reply

    On my setup (10.5.2/Intel) following Info.plist makes Eclipse use Java 1.4. My system default is 1.5. I don’t have 1.6 installed.

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
        <key>CFBundleExecutable</key>
        <string>eclipse</string>
        <key>CFBundleGetInfoString</key>
        <string>Eclipse 3.3 for Mac OS X, Copyright IBM Corp. and others 2002, 2007. All rights reserved.</string>
        <key>CFBundleIconFile</key>
        <string>Eclipse.icns</string>
        <key>CFBundleIdentifier</key>
        <string>org.eclipse.eclipse</string>
        <key>CFBundleInfoDictionaryVersion</key>
        <string>6.0</string>
        <key>CFBundleName</key>
        <string>Eclipse</string>
        <key>CFBundlePackageType</key>
        <string>APPL</string>
        <key>CFBundleShortVersionString</key>
        <string>3.3</string>
        <key>CFBundleSignature</key>
        <string>????</string>
        <key>CFBundleVersion</key>
        <string>3.3</string>
        <key>Eclipse</key>
        <array>
            <string>-keyring</string>
            <string>~/.eclipse_keyring</string>
            <string>-consoleLog</string>
            <string>-showlocation</string>
            <string>-vm</string>
            <string>/System/Library/Frameworks/JavaVM.framework/Versions/1.4</string>
        </array>
    </dict>
    </plist>
    #281922 Reply

    dnedrow
    Member

    OK, after also adding -clean to the Eclipse array, it finally will switch versions. I don’t know if any of the MyEclipse developers are working with Java 6 on the Mac, but Eclipse crashes at startup when pointed at Java 6. Unfortunately, I can’t provide much more detail due to NDA, but the SDK is available for free to Apple Developer Connection members.

Viewing 5 posts - 1 through 5 (of 5 total)
Reply To: Specifying JDK/VM when running on OS X (Leopard)

You must be logged in to post in the forum log in