How to make an existing directory into an eclipse project

My Method:

I clone this file to new project directory , and rename Project-Name to my project name, after that i import new files and directory from Eclips

File Name: .project ( Use Notepad for make this file...select Save as type to All Files (*.*) and write file name like: .project )

<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
    <name>Project-Name</name>
    <comment></comment>
    <projects>
    </projects>
    <buildSpec>
    </buildSpec>
    <natures>
    </natures>
</projectDescription>

In the New Java Project wizard, uncheck the checkbox that says Use default location and the use the Browse button to find your directory.


It is pretty easy to do. Go to File->New-> Project. In the Project wizard, choose the type of project you want and then be sure to unclick the 'Use default location` checkbox. Browse for your folder in the widget that then becomes enabled. Click finish after that.

Alternatively, you could create a brand new project workspace in a new location. Then, assuming Java as your project type, you can open up your project properties and add as a source folder your existing directory. To do this, use the 'Link Source' button on the Java Build Path -> Source tab of your Project Properties dialog.

Tags:

Eclipse