Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"Source folder is not a Java project" error in eclipse

I am trying to import maven project into eclipse 4.2 version.Its not importing the project properly. Its giving me error "Source folder is not a Java project" while I am trying to create a new call in it. Even ctrl+mouse click is also not working. I don't understand the problem. Even when I right click on project and select build path it shows me no action available. Anyone face the same issue

like image 712
Harry Avatar asked Jul 30 '12 10:07

Harry


People also ask

How do I mark a folder as source in Eclipse?

Right-click the folder, choose Build Path, then Use as Source Folder.

What is source folder in Eclipse?

A source folder is marked by Eclipse as containing java sources. Then, when you compile your project Eclipse will look for your source code into all your source folders. You can make any folder become a source folder adding it to the java build path.


2 Answers

In the maven project directory try

mvn eclipse:eclipse 

that may do the trick.

like image 149
Matthias Avatar answered Oct 01 '22 11:10

Matthias


I ran into the same issue and fixed it by converting my project to faceted form.

Right click your project > Properties > Project Facets > Convert to Faceted Form, and select Java.

Java Project Facets

like image 28
lkisac Avatar answered Oct 01 '22 10:10

lkisac