Home » Language IDEs » Java Development Tools (JDT) » finding Java library source
finding Java library source [message #251807] |
Sun, 02 March 2008 15:54  |
Eclipse User |
|
|
|
Originally posted by: rpboland.gmail.com
Note: I originally posted this on a Sun forum but did not get a response.
I am working on project using Java jdk1.5.0_14 but am having trouble
accessing its source from within Eclipse 3.3.1.
I originally used ctags to create a tags file for vi using jdk1.5.0_14/src.
This works well.
From within vi I can find the source for methods in Java jdk1.5.0_14
very nicely using the tags commands of vi.
But I am LEARNING Eclipse and want to have the same capability of finding
the source for methods/classes/etc. of Java jdk1.5.0_14 from within
Eclipse.
Now I have the JRE System Library (jdk1.5.0_14) loaded into Eclipse and it
contains
jar files rt.jar, jsse.jar, jce.jar, charsets.jar, sunjce_provider.jar,
localedata.jar, sunpkcs11.jar,
and dnsns.jar.
For each of these jar files Eclipse allows me to make a Java Source
Attachment
(either a directory, a JAR file, or a zip file).
However, the source for jdk1.5.0_14 (in subdirectory src)
is structured completely differently from what these jar files suggest
(ie. a source directory in src
corresponding to each jar file).
For example the subdirectories of src are com, java, javax, launcher, org,
and sunw.
src also contains file src.zip.
Is there a way to fix this so that I can look at the jdk1.5.0 source code
from within Eclipse?
For example is there a set of source files corresponding to the jar files?
Solutions much appreciated.
Thanks in advance for any help or insight provided.
Ralph Boland (rpboland@gmail.com)
|
|
|
Re: finding Java library source [message #251811 is a reply to message #251807] |
Sun, 02 March 2008 16:10   |
Eclipse User |
|
|
|
Originally posted by: merks.ca.ibm.com
Ralph,
Normally when I set up a JRE, Eclipse just finds the src.zip/jar and
uses that for resolving source files for the JRE. There must be a way
to do that manually... It won't necessarily have the source for
everything though...
Ralph Boland wrote:
> Note: I originally posted this on a Sun forum but did not get a response.
>
> I am working on project using Java jdk1.5.0_14 but am having trouble
> accessing its source from within Eclipse 3.3.1.
>
> I originally used ctags to create a tags file for vi using
> jdk1.5.0_14/src.
> This works well. From within vi I can find the source for methods in
> Java jdk1.5.0_14
> very nicely using the tags commands of vi.
>
> But I am LEARNING Eclipse and want to have the same capability of
> finding the source for methods/classes/etc. of Java jdk1.5.0_14 from
> within Eclipse.
>
> Now I have the JRE System Library (jdk1.5.0_14) loaded into Eclipse
> and it contains
> jar files rt.jar, jsse.jar, jce.jar, charsets.jar,
> sunjce_provider.jar, localedata.jar, sunpkcs11.jar,
> and dnsns.jar. For each of these jar files Eclipse allows me to make a
> Java Source Attachment
> (either a directory, a JAR file, or a zip file). However, the source
> for jdk1.5.0_14 (in subdirectory src)
> is structured completely differently from what these jar files suggest
> (ie. a source directory in src
> corresponding to each jar file). For example the subdirectories of src
> are com, java, javax, launcher, org, and sunw.
> src also contains file src.zip.
>
> Is there a way to fix this so that I can look at the jdk1.5.0 source
> code from within Eclipse?
>
> For example is there a set of source files corresponding to the jar
> files?
>
> Solutions much appreciated.
>
> Thanks in advance for any help or insight provided.
>
> Ralph Boland (rpboland@gmail.com)
>
>
>
|
|
|
Re: finding Java library source [message #251814 is a reply to message #251807] |
Sun, 02 March 2008 18:24  |
Eclipse User |
|
|
|
Ralph Boland wrote:
> Note: I originally posted this on a Sun forum but did not get a response.
>
> I am working on project using Java jdk1.5.0_14 but am having trouble
> accessing its source from within Eclipse 3.3.1.
>
> I originally used ctags to create a tags file for vi using jdk1.5.0_14/src.
> This works well. From within vi I can find the source for methods in
> Java jdk1.5.0_14
> very nicely using the tags commands of vi.
>
> But I am LEARNING Eclipse and want to have the same capability of
> finding the source for methods/classes/etc. of Java jdk1.5.0_14 from
> within Eclipse.
>
> Now I have the JRE System Library (jdk1.5.0_14) loaded into Eclipse and
> it contains
> jar files rt.jar, jsse.jar, jce.jar, charsets.jar, sunjce_provider.jar,
> localedata.jar, sunpkcs11.jar,
> and dnsns.jar. For each of these jar files Eclipse allows me to make a
> Java Source Attachment
> (either a directory, a JAR file, or a zip file). However, the source for
> jdk1.5.0_14 (in subdirectory src)
> is structured completely differently from what these jar files suggest
> (ie. a source directory in src
> corresponding to each jar file). For example the subdirectories of src
> are com, java, javax, launcher, org, and sunw.
> src also contains file src.zip.
>
> Is there a way to fix this so that I can look at the jdk1.5.0 source
> code from within Eclipse?
>
> For example is there a set of source files corresponding to the jar files?
>
> Solutions much appreciated.
>
> Thanks in advance for any help or insight provided.
>
> Ralph Boland (rpboland@gmail.com)
>
>
>
Hi Ralph. This may be a dumb question, but what command in Eclipse are
you trying to use in order to access the source? If you have the source
attached, you can just place the cursor on any Java type in a Java
source file (e.g., String), press F3 (or Navigate/Open Declaration) and
it opens up the source code for the String class. If you don't have
source attached, you have the option to attach it at that time by
browsing to the src.zip file in your SDK directory. Are you trying to
browse the source code some other way? Hope this helps. Mark
|
|
|
Goto Forum:
Current Time: Sat Apr 19 11:35:43 EDT 2025
Powered by FUDForum. Page generated in 0.02874 seconds
|