eclipse编辑java项目代码时弹框内容“this compilation unit is not on the build path of a Java project”
从SVN上面检出了一个项目,在写代码的时候使用自动提示就报“this compilation unit is not on the build path of a Java project”错误,如图:
原因是检出的项目缺失了Java编译器。
解决方案如下:
关闭eclipse
找到项目文件夹内的.project文件
在文件内增加Java编译器相关内容:
<?xml version="1.0" encoding="UTF-8"?>
4.重开IDE项目即可重新编译为正常项目
原文链接:https://blog.csdn.net/shenyangyin3455/article/details/97009773