This compilation unit is not on the build path

This compilation unit is not on the build path of a Java project 解决办法​:大致是因为项目文件缺失

解决方法:

找到项目根目录下的.project文件,修改,加入jdt支持,我的项目修改后如下所示

<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
	<name>dmp_pj</name>
	<comment></comment>
	<projects>
	</projects>
	<buildSpec>
		<buildCommand>
			<name>org.eclipse.jdt.core.javabuilder</name>
			<arguments>
			</arguments>
		</buildCommand>
	</buildSpec>
	<natures>
		<nature>org.eclipse.jdt.core.javanature</nature>
		<nature>org.apache.ivyde.eclipse.ivynature</nature>
	</natures>
</projectDescription>



你可能感兴趣的:(Build)