使用eclipse新建了一个maven工程,新建了一个java类,但是一直报错:
the resource is not on the build path of a java project
解决方法:
发现新建的package都是文件夹的形式,在eclipse打开的工程上右键,“属性” -> “Java Build Path”, 选择”Source”选项卡,点击”Add Folder”,将希望显示为package的包加入即可。
使用eclipse新建了一个maven工程,新建了一个java类,但是一直报错:
the resource is not on the build path of a java project
解决方法:
发现新建的package都是文件夹的形式,在eclipse打开的工程上右键,“属性” -> “Java Build Path”, 选择”Source”选项卡,点击”Add Folder”,将希望显示为package的包加入即可。