Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to view Java SE 6 source in Netbeans on a Mac?
    primarykey
    data
    text
    <blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="https://stackoverflow.com/questions/4120107/source-code-for-mac-os-x-java-version-1-6-0-22">Source code for Mac OS X java version 1.6.0_22</a> </p> </blockquote> <p>I've been developing a web app using Java EE 6. At work I'm using Netbeans on Windows 7. I always took it for granted that I could view the Java SE 6 source by, say, ctrl-clicking on <code>String</code> and seeing the code.</p> <p>Recently I installed Netbeans on my macbook at home (Mac OS X 10.6.5) and downloaded the project. Everything's working fine, but I noticed I can't view the source of the standard java classes any more. All methods have the <code>throw new RuntimeException("Compiled Code");</code> in them. </p> <p>What's missing that I need to install here?</p> <p><strong>Update:</strong> Okay, after reading <a href="http://netbeans-org.1045718.n5.nabble.com/where-is-JDK-source-kept-on-Mac-OSX-td3242748.html" rel="nofollow noreferrer">this discussion</a> I went to <a href="http://connect.apple.com/" rel="nofollow noreferrer">http://connect.apple.com/</a> and downloaded/installed <em>Java for Mac OS X 10.6 Update 5 Developer Package</em> (also had to update OSX to 10.6.8). However, I still can't view the source in Netbeans. How do I configure Netbeans so the Java SE 6 source is viewable?</p> <p><strong>Update 2:</strong> I've been using <a href="http://javasourcecode.org/" rel="nofollow noreferrer">http://javasourcecode.org/</a> in the meantime, but it would still be better to view the source in Netbeans.</p> <p><strong>Update 3:</strong> it looks like if I go to <code>Tools-&gt;Java Platforms-&gt;Sources</code> I can choose the source to read from. I tried selecting <code>/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/1.6.0_26-b03-384.jdk</code> but this didn't work, which I guess makes sense since this is the default platform.</p> <p>I keep reading everywhere that I should find the <code>.jar</code> I need at <code>/Library/Java/Home/src.jar</code> but it isn't there. A Spotlight search for <code>src.jar</code> or <code>src.zip</code> turns up blank. Can someone please help me fill in the blanks here?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload