码迷,mamicode.com
首页 > 编程语言 > 详细

this compilation unit is not on the build path of a java project

时间:2015-09-18 15:10:27      阅读:444      评论:0      收藏:0      [点我收藏+]

标签:

  在eclipse中新建maven project后,会自动生成main\test目录结构,新建一个测试类,然后编辑类文件时,总是提示错误:this compilation unit is not on the build path of a java project。后来在网上找到了解决办法:

 

  1. 需要先安装maven eclipse插件 m2eclipse
  2. 执行命令 mvn eclipse:clean
  3. 执行命令 mvn eclipse:eclipse

 

以上操作成功后,问题就解决了! 

this compilation unit is not on the build path of a java project

标签:

原文地址:http://www.cnblogs.com/diyunpeng/p/4819029.html

(1)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!