- This topic has 3 replies, 3 voices, and was last updated 15 years, 3 months ago by Brian Fernandes.
-
AuthorPosts
-
THCMemberHello. 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.
support-shaliniMemberTHC,
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?
THCMembersorry 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.
Brian FernandesModeratorTHC,
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.
-
AuthorPosts