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!
Similar Posts:
- FYI: Eclipse 3.4 (“Ganymede”) + Hibernate IDE = NoClassDefFoundError
- Problems Installing Glassfish Plugin in Eclipse 3.3?
- Quick Tip: Using “Ant Builder” to customize Eclipse builds using ant scripts
- FYI: Spring IDE 2.0.2 is broken on Eclipse 3.3/Java 6
- Quick Tip: When Eclipse just won’t clean up the Tomcat Working Directory


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.
May 28th, 2009 at 9:06 am
thanks! very very helpful.
June 19th, 2009 at 7:21 am
Hi,
I had to modify to run a class as Application in Eclipse 3.4.
org.eclipse.jdt.core.javabuilder
June 19th, 2009 at 7:25 am
Hi,
I had to modify <buildSpec/> to run a class as Application in Eclipse 3.4.
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>