Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"This compilation unit is not on the build path of a java project" -Eclipse

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...

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

like image 489
Deepak Mani Avatar asked Dec 21 '25 23:12

Deepak Mani


1 Answers

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.

like image 120
Jaiprakash Avatar answered Dec 24 '25 15:12

Jaiprakash



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!