简体   繁体   English

我的eclipse neon正在运行Java代码的先前快照

[英]My eclipse neon running the exact previous snapshot of Java code

I am using eclipse neon 4.6.3 in ubuntu 14.04. 我在Ubuntu 14.04中使用Eclipse Neon 4.6.3。 Suddenly today I have noticed that it is compiling and running the immediate previous snapshot of the code. 今天突然我注意到它正在编译并运行代码的前一个快照。

For example, I had a code like this: 例如,我有这样的代码:

System.out.println("1");

After running this if I change it like this: 运行此命令后,如果我将其更改为:

System.out.println("2");

It will print: 1 它将打印:1

That means it is running the previous runned snapshot of the code. 这意味着它正在运行先前运行的代码快照。 As a result I have to run every program twice to observe the output. 结果,我必须运行每个程序两次以观察输出。

I have tried to open new project, delete previous projects, restart eclipse etc. Nothing worked. 我试图打开新项目,删除以前的项目,重新启动eclipse等。 However, when I run python scripts in eclipse, that works fine. 但是,当我在Eclipse中运行python脚本时,效果很好。

Anybody has any idea? 有人知道吗?

Thanks in advance 提前致谢

Edit: When I go to Window > Preferences > Launch it shows this: 编辑:当我转到“窗口”>“首选项”>“启动”时,它显示如下:

在此处输入图片说明

May be this will be helpful to find out the problem. 也许这将有助于发现问题。

It is solved. 解决了。

Go to Window > Preferences > Launching 转到窗口>首选项>启动

Check the General option: Build (if required) before launching 选中“常规”选项:启动前先构建(如果需要)

Then it will be ok. 这样就可以了

解决问题后

Thank you all for trying to help me. 谢谢大家为我提供的帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM