“此编译单元不在Java项目的构建路径上" -蚀 [英] "This compilation unit is not on the build path of a java project" -Eclipse

查看:123
本文介绍了“此编译单元不在Java项目的构建路径上" -蚀的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对蚀环境是陌生的.我通过以下方式从存储库(Hg)中克隆我的项目 新建->项目-> Mercurial->克隆现有项目.在这里,我的问题是在编辑编码时出现此编译单元不在Java项目的构建路径上"消息.自动完成功能不起作用.请让我知道如何解决这个问题...

I am new to the eclipse environment. I clone my project from the repository(Hg) by New->Project->Mercurial->Clone existing project. Here my problem is "This compilation unit is not on the build path of a java project" message comes when I editing the coding. Auto completion not working. Kindly let me know how solve this problem...

注意: 我在Google以及stackoverflow中进行了搜索.但是我仍然不清楚.

Note: I searched in google as well as in stackoverflow. But still I am not clear in that.

推荐答案

我在Windows 7上的Eclipse中也遇到了这个问题.解决方法是 转到项目->右键单击->选择属性->项目构面->修改所用JDK版本的Java版本. 请注意,如果项目的JDK版本更高,例如1.5,而您的项目设置为jdk 1.4,则它将无法正常工作. 反之亦然.

I had this problem in Eclipse on Windows 7 as well. The solution is Go to Project-> right Click-> Select Properties -> project Facets -> modify the java version for your JDK version you are using. Please note, if the JDK version of the project is higher, say, 1.5 and your project setting is jdk 1.4, then it will not work. Vice versa will work.

这篇关于“此编译单元不在Java项目的构建路径上" -蚀的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆