On Mac OS X 10.5.8, after upgrading to Java 1.6.0_22 and installing the latest developer update on October 20, 2010, src.jar for Java 6 does not exist.
$ find / System / Library / Java / System / Library / Frameworks -name src.jar
/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/src.jar
/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home/src.jar
Switching to the source in NetBeans 6.9.1 says compiled code for all constructors and methods, for example. java.awt.Point :
public Point() { //compiled code throw new RuntimeException("Compiled Code"); }
Perhaps you can extract a useful JAR from a previous update, as suggested in this thread .
Appendix: in NetBeans, the default platform location is an attribute in the file ~/.netbeans/6.9/config/Services/Platforms/org-netbeans-api-java-Platform/default_platform.xml :
<sources> <resource>jar:file:/Library/Java/JavaVirtualMachines/ 1.6.0_22-b04-307.jdk/Contents/Home/src.jar!/src/ </resource> </sources>
Alternatively, you can specify the file /Library/Java/Home/src.jar :
<sources> <resource>jar:file:/Library/Java/Home/src.jar!/src/</resource> </sources>
trashgod Oct 25 '10 at 3:11 2010-10-25 03:11
source share