With the latest Java update on MacOSX 10.6, Eclipse does not find the Java sources anymore.
I am not exactly sure (i.e. don't remember anymore) if I have downloaded the sources manually in the past and put them somewhere or if MacOSX provided them and Eclipse found them automatically.
Does MacOSX have the sources somewhere? (Please no assumptions here. I really want to know that.)
If not, where can I get them?
In macOS, the JDK installation path is /Library/Java/JavaVirtualMachines/jdk-10.
Mac OS X 10.7. 3 and above: Under System Preferences click on the Java icon to access the Java Control Panel which will list your Java version. If you do not see a Java icon under System Preferences, Java 7 or later versions is not installed.
As I understand it, as of "Java for Mac OS X 10.6 Update 3", there are 3 places you will find Java installed on MacOS.
Note the MacOS rule of putting Apple-supplied standard components in /System/Library and local extensions into /Library
The JDK installed by default does not now have a src.jar (although it is a JDK, so has javac etc). But if you install the 'Java Developer package' from Apple, you will get
/Library/Java/JavaVirtualMachines/1.6.0_22-b04-307.jdk
which has src.jar under Contents/Home
So I think that the sane thing to do is install the developer package and point to it from your IDE.
Update - for "Java for Mac OS X 10.7 Update 1", having installed the developer package the source can be found at
/Library/Java/JavaVirtualMachines/1.6.0_29-b11-402.jdk/Contents/Home/src.jar
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With