Home » Newcomers » Newcomers » Attach Source not working(cannot attach the source of a jar file)
Attach Source not working [message #521151] |
Tue, 16 March 2010 11:11  |
Eclipse User |
|
|
|
I have a jar on my build path of a project, the source of the jar is another project in my workspace.
When I hit F3 to see the source of a class or method a "Class File Editor" window opens which tells me "Source not found". I click the "Attach Source..." button and a "Source Attachment Configuration" dialog opens.
There are 3 options to choose from, Workspace, External File, External Folder.
None of them work, I can choose an option, select the source, click ok, the cursor goes to an hour glass, when it returns to an arrow nothing has happened, no source.
I can compile the jar with the source, but this is more work then it sounds like.
Any ideas?
Some more info, I'm running Oracle Workshop for WebLogic 10.3, which is running over Eclipse 3.3.2
Thanks
John
[Updated on: Tue, 16 March 2010 11:11] by Moderator
|
|
|
Re: Attach Source not working [message #521184 is a reply to message #521151] |
Tue, 16 March 2010 12:41   |
Eclipse User |
|
|
|
I have trouble with this too. When it's code you have, don't go find the
code itself, but select the src folder above it. At least, when it has
worked for me, that's what I've done.
Also, of course, if the (foreign) JAR you're consuming doesn't include
source code, you won't be able to see it.
Last, try right-clicking on the project, choose Build Path, then the
Libraries tab, click on the triangle next to the library whose code
interests you, then expand the JAR in question, click on Source, then
navigate, similarly, to the place where the source should be. This is, I
think, how you're supposed to set things up ahead of running into
missing code in the editor (ctrl-click) or debugger.
Again, when it has ever worked, this has been how I've done it. It
doesn't seem to work every time. I'm hoping one day to understand why.
Best of luck,
Russ Bateman
On 3/16/2010 9:11 AM, John wrote:
> I have a jar on my build path of a project, the source of the jar is
> another project in my workspace.
>
> When I hit F3 to see the source of a class or method a "Class File
> Editor" window opens which tells me "Source not found". I click the
> "Attach Source..." button and a "Source Attachment Configuration" dialog
> opens.
> There are 3 options to choose from, Workspace, External File, External
> Folder.
> None of them work, I can choose an option, select the source, click ok,
> the cursor goes to an hour glass, when it returns to an arrow nothing
> has happened, no source.
>
> I can compile the jar with the source, but this is more work then it
> sounds like.
>
> Any ideas?
>
> Some more info, I'm running Oracle Workshop for WebLogic 10.3, which is
> running over Eclipse 3.3.2
> Thanks
> John
|
|
| | | | | |
Re: Attach Source not working [message #1823751 is a reply to message #521151] |
Wed, 01 April 2020 06:13  |
Eclipse User |
|
|
|
Solved:
I had the same problem. Even though I had included the dependent projects into the build path, ecipse was always opening the class file from the jar file rather than the source file from the project. I had done all sorts cleaning, refreshing and everything. But didn't seem to work. Then I checked the versions of the jar and the corresponding project in the workspace. They were different. I corrected these. Then it started opening the source files.
Hope this helps some. :)
|
|
|
Goto Forum:
Current Time: Tue Jul 22 18:37:40 EDT 2025
Powered by FUDForum. Page generated in 0.50973 seconds
|