• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

"Source not found." and the src.zip

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 485
Eclipse IDE Firefox Browser Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Marshal
Posts: 79153
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
sara rod,
Your post was moved to a new topic.
 
It runs on an internal combustion engine. This ad does not:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic