开发者

Eclipse behaves inconsistently after system crash

I have an urgent and puzzling problem with Eclipse. My system crashed on itself this morning, and after I rebooted, I can run a program perfectly within Eclipse, by right-click on the Java file and choose 'Run as Java Application'. However, after I make the project into a .jar file, and execute that, the behavior of the program simply does not reflect what the code does.

I have checked that I am compiling the right project, and running the same code from the same project within Eclipse does not cause any problem. And btw, I am using a plug-in called fat jar to compile the .jar file, if that makes any difference. I have used the same plug-in numerous times before to compile the very same project, and never had any problem.

Does anyone know what might be causing this weird/inconsistent behavior of Eclipse? Do I need to re-install Eclipse and开发者_开发知识库 fat jar to fix this? Thanks.


My usual procedure for strange things like this is,

A) Clean and build again i.e. Project -> Clean

B) (not so eclipse related) Since I am usually using a build tool, do the same thing from the tool to ensure its eclipse.

C) If it gets really bad, I'll start a new eclipse workspace and try from there.

D) Iff I had just installed a new plugin before things went strange I'd think about reinstalling


It sounds extremely strange :) But Eclipse can, and has, acted strange before. I have had problems in both Java, C++ and PHP development during the years that could only be fixed with a resinstall of Eclipse. You could probably fix it by digging around, but the time it takes to find and fix these types of strange problems in Eclipse is simply not worth it.

Good luck!


Please try to Reset Perspective first (Before reinstall eclipse)

Window->Reset Perspective.
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜