I made a Java6 app but Leopard tries to run it as a Java5 app and fails miserably

Posted:
in macOS edited January 2014
Title says it all, question: how do I tell Leopard to use Java6? I have the update installed...

Comments

  • Reply 1 of 8
    MarvinMarvin Posts: 15,322moderator
    Check the /System/Library/Frameworks/JavaVM.framework/Versions to see current version the shortcut is pointing at.
  • Reply 2 of 8
    lorrelorre Posts: 396member
    Current points to a folder called A, CurrentJDK points to 1.5.0
  • Reply 3 of 8
    MarvinMarvin Posts: 15,322moderator
    Is there a 1.6.0 folder in there somewhere? 1.5.0 is Java 5. The updater should have overridden the link to the Java 5 binaries. I'm not sure if you would override it in the system library though - with GCC, you override it in the command line. Does the installer have documentation that says if you have to manually enable the newer version?
  • Reply 4 of 8
    ali88ali88 Posts: 5member
    If your application is in the form of application bundles open Info.plist of your application bundle with Property List Editor and change value of JVMVersion to 1.6+ .

  • Reply 5 of 8
    lorrelorre Posts: 396member
    I take it that's an XCode screenshot?



    I'm working in Netbeans (have to... sigh...) and I can't immediately find the file. I have found a project.properties file, but there aren't any references to JVMVersion in there, no references to 1.5 at all in there. I do see a few fields where 1.6 is listed so...



    And yes, there is a Java 1.6.0 folder in there.
  • Reply 6 of 8
    ali88ali88 Posts: 5member
    Sorry for my late reply. It is an screenshot of "Properly List Editor" application which gets installed along side Xcode and other Developer tools. I have never used netbeans but if it has an option for making Application Bundles for Mac OS X, use it then right click on your application bundle, then select show package contents, open "Contents" folder, then open Info.plist file with Property List Editor or any text editor.

    ----

    If your application is a JAR file you should make Java 1.6 your default Java Runtime , for doing so you should go to Applications/Utilities/Java and open Java (1.6) Preferences (or something like that) then change your Java version to 6(1.6) and save.
  • Reply 7 of 8
    mdriftmeyermdriftmeyer Posts: 7,503member
    Quote:
    Originally Posted by Lorre View Post


    I take it that's an XCode screenshot?



    I'm working in Netbeans (have to... sigh...) and I can't immediately find the file. I have found a project.properties file, but there aren't any references to JVMVersion in there, no references to 1.5 at all in there. I do see a few fields where 1.6 is listed so...



    And yes, there is a Java 1.6.0 folder in there.



    $java -version



    Which JVM is currently being run?
  • Reply 8 of 8
    solipsismsolipsism Posts: 25,726member
    Quote:
    Originally Posted by Lorre View Post


    Title says it all, question: how do I tell Leopard to use Java6? I have the update installed...



    Did you change the Java Preferences.app in /Applications/Utilities? Even with Java 6 installed it still defaults to 5.



    Or is that just for the browser?
Sign In or Register to comment.