开发者

Eclipse not compile my servlet [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly bro开发者_JAVA技巧ad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 11 years ago.

I have eclipse project with many packages. I move one .java file from one package to another and then I try to compile. Compile was successful but this file hasn't been compiled. I restart eclipse but this problem still appear. I create new test class ant this class weren't compile again. I use Eclipse Indigo on Mac OSX 10.6.8 Can someone help me. Thanks in advance.


Moving:

If you have moved the file within eclipse, you have been asked if all references should be updated. This you have to answer with "yes", as long as there are no (red) errors shown.

If you moved the file in the finder, move it back and do it again within eclipse. Make sure the new destination is in your src-folder.

Rebuilding project:

Go to the "Project"-menu and disable the menu "Build automatically". Then choose "Build all" from the same menu (make sure you selected your project in the "Package Explorer". Afterwards enable "Build automatically" again.

Check for errors:

Go into the "Problems"-panel and check if there is a message about any problems within your project. If so, try to fix them or post them here.

If it is still not working and no errors are shown, go further:

Check your project SetUp:

Right-click your Project and select the "Properties" menu from the appearung context-menu. Go to the menu "Java Build Path" in the appearing window and select the tab "Source" on the right site. Check if all your source folder are visible there. If not, add them there.

Repeat the steps above then.


I suppose your setting for the java build path is not correct.

To check this right click on your project and select properties from the context menu. In the dialog click 'Java Build Path' / Tab Source and make sure that all folders containing your sources files are listed here, otherwise they will be ignored.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜