Issue
I am on a mac, but I don't think it will make a difference. I have a directory that I want to fully import/add into Eclipse. What I did is this:
- Right click import
- General → Existing Projects into Workspace
Then when I click browse for either root directory or archive file and select the folder I can't click finish. The folder is empty and just contains a few folders but for some reason I can't click finish.
Solution
The Eclipse UI is a little bit confusing.
The Import -> "Existing projects into workspace" actually means import "Existing Eclipse projects into workspace". That's why you can't click on finish: the import option looks for a .project
file (the file used by Eclipse to store the project options) in the directory that you have chosen.
To import existing source code that doesn't have an Eclipse project file you have the following options (I suppose that you want to create a Java project):
New project inside the workspace dir: Create a new empty Java project into the workspace (File->New->Java Project). Then right click on the source folder and choose Import...->General->File system then choose your files, and it will make a copy of your files.
Tip: you can drag&drop your files from the Finder into the src folder.
Create an eclipse project in your existing dir: Create a new Java project, but in the "New Java Project" window:
- Un check the Use default location option, and choose the directory where is your non-Eclipse project.
- Click Next and configure the sub-directories of your non-Eclipse project where the source files are located. And you are done :)
Answered By - Diego
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.