Eclipse is not showing compilation errors in proje

2020-05-21 23:56发布

I am using Eclipse Juno with Java 1.7 and i have created a test project. Now the problem is with project explorer. Project explorer is not showing compilation errors if class have any error. I cleaned, closed , and rebuild the project but nothing is changed. It is still not showing errors in project explorer.It was working fine with Helios. enter image description here

标签: java eclipse
10条回答
beautiful°
2楼-- · 2020-05-22 00:41

Set your Errors/Warnings:

Steps:

1) Right click on the project and go to the properties.
2) Select Java Compiler -> Errors/Warnings.
3) Check the "Enable project specific settings"

查看更多
Animai°情兽
3楼-- · 2020-05-22 00:44

I had the same problem. I checked the .classpath file of the Eclipse project. It had incorrect value of src so it was pointing to the wrong source of Java files.

My file's incorrect entry:

<classpathentry kind="src" path="src"/>

I changed it to the correct entry:

<classpathentry kind="src" path="source/java"/>

Now, its working :)

查看更多
Explosion°爆炸
4楼-- · 2020-05-22 00:48

Set your build path and java compiler:

Steps:

  1. Right click on the project and go to the properties.
  2. Go to the java build path and set the jre version to the jdk5 or more. (which ever you have to your system).
  3. Go to the java compiler and set java version to the compatible with jre (which ever you set in java build path).
  4. After refreshing the project you may get the compilation error.
查看更多
迷人小祖宗
5楼-- · 2020-05-22 00:53

You can restore the errors to the package explorer by right clicking on an error in the problems pane and selecting show in and then select package explorer.

restoring errors to package explorer

查看更多
登录 后发表回答