score:1

you can download jdk6 here http://support.apple.com/kb/dl1573

wish it helps

score:6

for mountain lion, apple's java is up to 1.6.0_35-b10-428.jdk as of today.
it is indeed located under /library/java/javavirtualmachines .

you just download
"java for os x 2012-005 developer package" (sept 6, 2012)
from
http://connect.apple.com/

in my view, apple's naming is at least a bit confusing; why "-005" - is this the fifth version, or the fifth of five installers one needs?

and then run the installer; then follow the above steps inside eclipse.

score:12

i have just ran into the same problem after updating. the jre that is downloaded by osx lion is missing javaruntimesupport.jar which will work but can wreck havoc on a lot of things. if you've updated, and you had a working jdk/jre installed prior to that, do the following in eclipse:

1) project > properties > java build path > select broken jre/jdk > edit

2) select "alternate jre"

3) click "installed jres..."

4) in the window that opens, click "search..."

if all goes well, it will find your older jre/jdk. mine was in this location:

/system/library/frameworks/javavm.framework/versions/1.6/home

score:26

on newer versions of os x you should find all jres (and jdks) under

/library/java/javavirtualmachines/

/system/library/java/javavirtualmachines/

the old path

/system/library/frameworks/javavm.framework/

has been deprecated.

here is the official deprecation note:

http://developer.apple.com/library/mac/#releasenotes/java/javasnowleopardupdate3leopardupdate8rn/newandnoteworthy/newandnoteworthy.html#//apple_ref/doc/uid/tp40010380-ch4-sw1

score:97

you can download the 10.7 lion jdk from http://connect.apple.com.

  1. sign in and click the java section on the right.

  2. the jdk is installed into a different location then previous. this will result in ides (such as eclipse) being unable to locate source code and javadocs.

  3. at the time of writing the jdk ended up here:

    /library/java/javavirtualmachines/1.6.0_26-b03-383.jdk/contents/home

  4. open up eclipse preferences and go to java --> installed jres page

  5. rather than use the "jvm contents (macos x default) we will need to use the jdk location

  6. at the time of writing search is not aware of the new jdk location; we we will need to click on the add button

  7. from the add jre wizard choose "macos x vm" for the jre type

  8. for the jre definition page we need to fill in the following:

    • jre home: /library/java/javavirtualmachines/1.6.0_26-b03-383.jdk/contents/home
  9. the other fields will now auto fill, with the default jre name being "home". you can quickly correct this to something more meaningful:

    • jre name: system jdk
  10. finish the wizard and return to the installed jres page

  11. choose "system jdk" from the list

  12. you can now develop normally with:

    • javadocs correctly shown for base classes
    • source code correctly shown when debugging

Related Query

More Query from same tag