facebook

Hoe do i change path to source file location in debugger?

  1. MyEclipse IDE
  2.  > 
  3. General Development
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #301328 Reply

    THC
    Member

    Hello. I have a java class file associated with the wrong version of the corresponding source file. I cannot figure out how to change this association from the myeclipse tool. Can someone instruct me change this? thank you.

    #301344 Reply

    THC,
    Your problem is not clear. Is there any difference in the compiler compliance level of the project and the Java Run time environment? Can you tell us if you are getting any error messages in your console?
    Also, can you list out the steps to reproduce the error?

    #301358 Reply

    THC
    Member

    sorry for not being clear. I’ll try again.. I have a library referenced in my project as A.jar. When I was debugging the project, and it stepped into the file corresponding to foo.java, it could not find the java file. No big deal, as the tool allows you to find the path to the source on the fly. I successfully mapped to the source file on the fly. Subsequently, every time I traced through the file while debugging, everything was fine.

    However, then I updated that source file (foo.java), recompiled it, and replaced it in the original A.jar. This time, when it stepped into foo.java, it was still tracing to the old version of the source code. I double checked the path to the source, and it should have been selecting my updated foo.java. It was as if it had a cached version of foo.java stuck somewhere. The only way I could get it to point to the right (updated) foo.java, was to create an entirely new (otherwise identical) workspace and project. This obviously is not an acceptable solution.

    Does this clarify at all? I am not sure what to do in the future when this happens. Any help is appreciated. Thanks.

    #301396 Reply

    Brian Fernandes
    Moderator

    THC,

    In the package explorer view, locate the A.jar referenced by your project and choose Properties from the context menu (right-click). Go to the “Java Source Attachment” page. This is where the source path for classes in A.jar is set. Once you update this, you should see the right version of the source.

    Hope this helps.

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: Hoe do i change path to source file location in debugger?

You must be logged in to post in the forum log in