<?xml version="1.0" encoding="UTF-8"?>Now I want to turn it into a java project so it can be built with a java builder. I tried a few menus and other places inside Eclipse to no avail. Then I found I can just edit .project file, and that did the trick. Close Eclipse before doing these manual editing.
<projectDescription>
<name>project1</name>
<comment>project1</comment>
<projects>
</projects>
<buildSpec>
</buildSpec>
<natures>
</natures>
</projectDescription>
$HOME/workspace/project1/.project:I also added a .classpath file:
----------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>project1</name>
<comment>project1</comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
$HOME/workspace/project1/.classpath:
-----------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<!-- change the default bin directory to classes directory -->
<classpathentry kind="output" path="classes"/>
</classpath>
Finally, start Eclipse, open project1, and modify its source path, libraries, and other project properties.