|
|
|
Re: F3 opens the classB.class file instead of the classB.java file [message #1039790 is a reply to message #1010036] |
Fri, 12 April 2013 15:41 |
Florian F Messages: 9 Registered: February 2011 |
Junior Member |
|
|
I am alwas annoyed by this behavior.
I tried to put the projectA.jar at the very top of Order and Exports in project B, but when I press F3 or, worse, when I click on a stack trace in the console, it still opens the .class file.
It just doesn't make sense to me that Eclipse can identify the proper .java source file using the source attachment, can tell the source is in my workspace, can see that the relevant project A is currently open, but still doesn't think I might need to edit it.
I can avoid this by adding project A in project B's project dependencies (java build path, tab 'Projects'). But when I do that, all .class files of project A appear in project B's 'classes' folder and duplicate the classes in projectA.jar.
[Updated on: Fri, 12 April 2013 15:48] Report message to a moderator
|
|
|
|
Re: F3 opens the classB.class file instead of the classB.java file [message #1041585 is a reply to message #1040248] |
Mon, 15 April 2013 09:23 |
Florian F Messages: 9 Registered: February 2011 |
Junior Member |
|
|
Hello, thanks for looking into my problem.
The output folder is defined in the Java Build Path, tab 'Source' as MyProject/WebRoot/WEB-INF/classes. Note that it is a web project. And it is MyEclipse.
I checked and it is not in this output folder that the .class files of ProjectA appear, but in the deployment folder under tomcat. This happens when ProjectA is in 'Java Build Path > Project'. Is there a way to avoid this?
Just to be sure, when you say I must define a dependency on the project, should I define the dependency under 'Project Dependency' or under 'Java Build Path > Projects'?
And if I should not define a dependency on the jar, how can I tell ProjectB which jar in ProjectA to use?
[Updated on: Mon, 15 April 2013 09:23] Report message to a moderator
|
|
|
Powered by
FUDForum. Page generated in 0.03869 seconds