Dec 05
Quick Tip: Convert an Eclipse “General” Project to a Java Project
I don’t know how many times I’ve accidentally created a General project instead of a Java project, and it always bugged me that you couldn’t convert from General to Java without starting over.
The quick and easy hack is explained well here. Open the relevant .project file and add the following (note that you don’t need the <natures> element if one is already there):
<natures> <nature>org.eclipse.jdt.core.javanature</nature> </natures>
It’s too bad you can’t “Add Java Project Nature” from within the Eclipse UI
Make sure you do this with the project closed!


December 5th, 2007 at 4:16 pm
If you’re using Maven2, you can add Eclipse natures in Maven2 eclipse-plugin settings
December 5th, 2007 at 4:17 pm
If you’re using maven2, you can add Eclipse natures in Maven2 Eclipse plugin settings.
December 5th, 2007 at 11:43 pm
I do that without restarting Eclipse.
+1 for the lack of “add java nature”.
Kind Regards
December 5th, 2007 at 11:45 pm
Hum, there is an issue for that:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=102527
May 26th, 2008 at 5:16 pm
This informations was tremendously helpful to me. Thank you.