• Post Reply Bookmark Topic Watch Topic
  • New Topic

"Source not found." and the src.zip  RSS feed

 
alex bond
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have eclipse indigo installed. Whenever I debug and there is an error in the code, it will show a message in red saying "Source not found.".

On top of this, when I select a function and press the f3 button, this is supposed to pull up the source code. This does not happen because the "Source..." is "...not found".

I have looked around for a solution and I have seen that you will have to set the source of the .jars that are in your library to a src.zip that is in the jdk.

My problem is, I cannot find the src.zip.

I believe I have jdk installed (this is the one I installed -> http://www.oracle.com/technetwork/java/javaee/downloads/java-ee-sdk-6u3-jdk-7u1-downloads-523391.html).

Once I installed it, I looked into the folder named "jdk7". No where in there is there a .zip named src.

Is this the correct way to get the source code? Have I installed the correct "jdk"?


EDIT: Running windows 7
 
Mohana Rao Sv
Ranch Hand
Posts: 485
Eclipse IDE Firefox Browser Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
C:\Program Files (x86)\Java\jdk1.6.0_03 this folder contains src.zip which contains the source code of java. Just point to it.

you should download J2SE not J2EE refer the following link. http://www.oracle.com/technetwork/java/javase/downloads/jdk-7u2-download-1377129.html
 
Jesper de Jong
Java Cowboy
Sheriff
Posts: 16060
88
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Alex, welcome to the Ranch.

So, did you in the end find the src.zip or not? It should be there in the directory where you installed the JDK.

To get to see the sources in Eclipse, you'll need to tell Eclipse where to find the sources. In Eclipse, go to Window > Preferences > Java > Installed JREs. Make sure that your JDK is in the list (if not, add it using the Add... button). Then click the Edit... button. In the list of jars, click the rt.jar file and then click the button "Source Attachment...". In the window that pops up, set the path to the src.zip file (or click the button "External File..." and browse to src.zip).
 
alex bond
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hmm, I will try to install the SE. A java developer that I know recommended I just install the EE version so that I have access to all the funcitonality. Perhaps I need both SE and EE?

Also, when I installed EE, it didn't place anything the the C:\Program Files (x86)\Java\ folder. It placed it in C:\glassfish3, which has a folder in it named jdk7, which does not have src.zip in it. The entirety of the glassfish3 folder doesn't have a src.zip at all.

Jesper, when I look into the Intalled JREs, I only see Eclipse (Standard VM). When I do get the JDK and add it to this list, what should I add it as? Execution Environment Description, Standard 1.1.x VM, or Standard VM?

Also, thanks for the welcome


EDIT: Well, I installed the SE version. Looked at C:\Program Files (x86)\Java\ and did not see a jdk folder. I decided to take a look at C:\Program Files\ instead. I saw that there was a java folder there, took a peek, and alas, a jdk folder with a src.zip in there. I am not sure if that was there before or after I installed the SE and I am not sure why it installed it to C:\Program Files\ instead of the x86... (I chose the 64-bit install every time).

EDIT 2: Things seemed to have worked. This has been a lot more trouble than it had to have been... Why don't IDEs such as eclipse have the base JDKs and JREs included in a package? Wouldn't seem too difficult to do and would avoid unnecessary confusion with new users.
 
Campbell Ritchie
Marshal
Posts: 56599
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
sara rod,
Your post was moved to a new topic.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!