Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a src.jar in OSX?

In Windows, there is ( was a ) src.jar file that contains the java source files of the Java platform.

Is there something similar for Java 1.6 in OSX? I would like to specify this to my IDE so I can navigate to that source.

like image 960
OscarRyz Avatar asked May 04 '10 16:05

OscarRyz


2 Answers

On Mac OS X 10.7 (Lion), you have to first download and install the developer package:

  1. go to https://developer.apple.com/downloads/index.action
  2. log in (or sign up for a developer account)
  3. search for "java" in the search box above Categories
  4. choose the newest Java for Mac OS X 10.7 Update XXX Developer Package
  5. download and install

src.jar can then be found in:

/Library/Java/JavaVirtualMachines/1.6.0_***.jdk/Contents/Home/src.jar

On the older Mac OS X 10.6 (Snow Leopard), you do the same as above, except look for the newest Java for Mac OS X 10.6 Update XXX Developer Package):

src.jar can then be found in:

/Library/Java/JavaVirtualMachines/1.6.0_***.jdk/Contents/Home/src.jar
like image 117
Eero Avatar answered Sep 28 '22 07:09

Eero


On my system src.jar is in /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home

like image 20
t0ne Avatar answered Sep 28 '22 07:09

t0ne