Source Code for Mac OS X Java Updates

Java for Mac OS X 10.6 Update 3 updated to version java 1.6.0_22. However, they did not include source code or JavaDoc. Does anyone know if Apple will provide the source, and if so, where to find it?

I want to add a source to Eclipse.

+68
java macos
Nov 07 '10 at
source share
11 answers

I had the same problem today - I installed the Java Developer package from http://connect.apple.com , but could not find "src.jar" in /System/Library/Frameworks/JavaVM.framework/... more, By my car now in
/Library/Java/JavaVirtualMachines/1.6.0_22-b04-307.jdk/Contents/Home/src.jar .

Update:. For the latest version since March 2011, the bank now:
/Library/Java/JavaVirtualMachines/1.6.0_24-b07-334.jdk/Contents/Home/src.jar

Once again you will have to download the new Java Developer package first.

+80
Nov 07 2018-10-11T00:
source share

I do the following:

Download and install the Java Developer Kit (using your AppleId developer), the current version 1.6.0_24-b07-334.jdk , and then into the cd shell in the /System/Library/Frameworks/JavaVM.framework/Home directory.

Put symbolic links to the jdk, src.jar , docs.jar and appledocs.jar source files in the jdk you just downloaded, i.e.:

sudo ln -s /Library/Java/JavaVirtualMachines/1.6.0_24-b07-334.jdk/Contents/Home/src.jar src.jar

and similarly for the other two cans.

Then in Eclipse / Preferences you can create a new Installed JRE by duplicating the existing one (the existing one points to something like /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home ) and then select the new Installed JRE and remove original.

Eclipse projects may need to be updated to point to the β€œnew” JRE, but the source code and javadocs should now be available for standard java files without too much noise.

NB Make sure that the jdk version matches the version of your Java system so that it works correctly.

+18
Apr 05 2018-11-11T00:
source share

Install java source documents in 8 steps:

  • Log in to your Apple ID ( http://connect.apple.com )

  • Go to https://developer.apple.com/downloads/index.action

  • Download Java for OS X 2012-00 * Developer Package

  • Set javadeveloper_for_os_x_ * .dmg .

  • Go to Eclipse> Preferences> Java> Installed JRE

  • Click Search ...

  • Select a JRE with a location such as / Library / Java / JavaVirtualMachines / 1.6.0_your_jdk_filename.jdk / contents / home . In my case, the jdk file name was 1.6.0_33-b03-424.jdk .

    You can find the jdk file name in the terminal: ls -l /Library/Java/JavaVirtualMachines

  • Now, when you try to "open an ad" and get the message "Source not found", click the Attach source button ... and paste / Library / Java / JavaVirtualMachines / 1.6.0_your_jdk_filename.jdk /contents/home/src.jar

+12
Jul 11 2018-12-12T00:
source share

These are the exact steps that worked for me.

Go to the apple dev java downloads page and get the latest version (the apple dev website will not allow you to download packages that are not suitable for your OS version).
I installed the Java Developer Package for Mac OS X 10.6 Update 5 (disk image) .

Then I executed the following commands:

 sudo ln -s /Library/Java/JavaVirtualMachines/1.6.0_26-b03-384.jdk/Contents/Home/src.jar /System/Library/Frameworks/JavaVM.framework/Home/src.jar sudo ln -s /Library/Java/JavaVirtualMachines/1.6.0_26-b03-384.jdk/Contents/Home/docs.jar /System/Library/Frameworks/JavaVM.framework/Home/docs.jar sudo ln -s /Library/Java/JavaVirtualMachines/1.6.0_26-b03-384.jdk/Contents/Home/appledocs.jar /System/Library/Frameworks/JavaVM.framework/Home/appledocs.jar 

Then I restarted Eclipse (I did not need to create a new JRE).

+11
Sep 02 2018-11-11T00:
source share
+3
Nov 07 '10 at
source share

It also does not work after downloading and installing. Using the directory did not work for me. This helped finally:

  sudo cp /Library/Java/JavaVirtualMachines/1.6.0_22-b04-307.jdk/Contents/Home/src.jar /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/ 

and linked through eclipse!

+1
Mar 24 '11 at 18:05
source share

I found that the solutions do not work for me (not sure what I am doing wrong), but I was able to see the source in Eclipse when I selected the src.jar directory instead of specifying the actual jar.

0
Dec 15 '10 at 9:53
source share

FYI; On a Macbook Pro 2008, however, reinstalling from scratch using Lion and NetBeans 7.0.1, thus updating the Java package 10.7 1 (latest version), source and JavaDoc, fortunately, were automatically installed after downloading the developer package, as described in this thread. All right.

0
Nov 15 2018-11-11T00:
source share

On January 31, 2012, Apple published Java for Mac OS X Developer Preview 11M3614 + 10M3614 on its developer site.

This is a version that includes source code, document, etc. (i.e. all the developer needs).

0
Feb 07 2018-12-12T00:
source share

Java 1 update works for OSX 10.7 Lion, I found that the sources are in: /Library/Java/JavaVirtualMachines/1.6.0_29-b11-402.jdk/Contents/Home/src.jar. As noted in other answers, you will first need to download and install Apple's Java Developer package before installing this directory in your IDE.

0
Feb 19 2018-12-12T00:
source share

Download the ubuntu package from the following link, extract it (command usr ar ie ar -x * .deb)

copy the src.zip file and save it.

http://packages.ubuntu.com/hardy/all/sun-java6-source/download

-one
Mar 06 '13 at 13:10
source share



All Articles