Results 1 to 5 of 5
  1. #1
    zacf is offline Member
    Join Date
    Nov 2008
    Posts
    2
    Rep Power
    0

    Default Think I broke Eclipse trying to switch Java versions

    I needed to use Java 1.6 for a project. So I switched via:

    $ cd /System/Library/Frameworks/JavaVM.framework/Versions
    $ sudo mv Current Current.old
    $ sudo ln -s 1.6 Current
    $ sudo mv CurrentJDK CurrentJDK.old
    $ sudo ln -s 1.6 CurrentJDK

    and in Eclipse:

    JRE Type: Mac OS X VM
    JRE Home directory: /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home

    It seemed to work fine. But then I needed to switch back to 1.5. So I did the same terminal commands, and then tried to start Eclipse to switch the preferences back, but got:

    JVM Terminated

    Exit code=-1
    -Xdock:icon=../Resources/Eclipse.icns
    -XstartOnFirstThread
    -Xms40m
    -Xmx512m
    -XX:MaxPermSize=256m
    -Dosgi.requiredJavaVersion=1.5
    -Dorg.eclipse.swt.internal.carbon.smallFonts
    -Djava.class.path=/Applications/eclipse/Eclipse.app/Contents/MacOSX/../../../plugins/org.eclipse.equinox.launcher_1.0.101.R34x_v2008081 9.jar
    -os macosx
    -ws carbon
    -arch x86
    -showsplash
    -launcher /Applications/eclipse/Eclipse.app/Contents/MacOSX/eclipse
    -name Eclipse
    --launcher.library /Applications/eclipse/Eclipse.app/Contents/MacOSX/../../../plugins/org.eclipse.equinox.launcher_1.0.101.R34x_v2008081 9.jar
    -startup /Applications/eclipse/Eclipse.app/Contents/MacOSX/../../../plugins/org.eclipse.equinox.launcher_1.0.101.R34x_v2008081 9.jar
    -keyring /Users/zac/.eclipse_keyring
    -consoleLog
    -showLocation
    -vm /System/Library/Frameworks/JavaVM.framework
    -vmargs
    -Xdock:icon=../Resources/Eclipse.icns
    -XstartOnFirstThread
    -Xms40m
    -Xmx512m
    -XX:MaxPermSize=256m
    -Dosgi.requiredJavaVersion=1.5
    -Dorg.eclipse.swt.internal.carbon.smallFonts
    -Djava.class.path=/Applications/eclipse/Eclipse.app/Contents/MacOSX/../../../plugins/org.eclipse.equinox.launcher_1.0.101.R34x_v2008081 9.jar

    I tried switching back to 1.6 at the command line, but that didn't work. So I figured I'd just scrap the whole thing and download the newest version of Eclipse (I had been using Europa), but I can't launch it either.

  2. #2
    zoomix is offline Member
    Join Date
    Oct 2008
    Location
    Sweden, Gothenburg
    Posts
    21
    Rep Power
    0

    Default

    Weird. Can you run other java programs?

  3. #3
    zacf is offline Member
    Join Date
    Nov 2008
    Posts
    2
    Rep Power
    0

    Default

    Yes. I ran a couple of my Eclipse projects from the command line and they run.

  4. #4
    bogomips is offline Member
    Join Date
    Nov 2008
    Posts
    4
    Rep Power
    0

    Default

    -vm /System/Library/Frameworks/JavaVM.framework
    This looks a little weird. As I understand the matter the -vm arg is suppose to point directly to the VM run command (e.g. $JAVA_HOME/bin/java). Try running eclipse setting the -vm command explicitly to the correct JRE.

  5. #5
    Fastrack20 is offline Member
    Join Date
    Jan 2009
    Posts
    1
    Rep Power
    0

    Default

    I am experiencing the same problem. The above suggestion did not work. Any thoughts?

Similar Threads

  1. Java Versions
    By hiranya in forum New To Java
    Replies: 6
    Last Post: 10-27-2009, 01:42 PM
  2. Can I delete/uninstall older versions of Java?
    By LudwigKarl in forum New To Java
    Replies: 3
    Last Post: 03-19-2008, 11:23 AM
  3. Using different versions of Java
    By javaplus in forum New To Java
    Replies: 2
    Last Post: 01-04-2008, 09:28 PM
  4. Problem with a switch statement in Java
    By baltimore in forum New To Java
    Replies: 2
    Last Post: 08-02-2007, 05:43 AM
  5. Concurrent Versions System (CVS)
    By JavaForums in forum Eclipse
    Replies: 0
    Last Post: 05-02-2007, 04:03 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •