tt0686
tt0686

Reputation: 1849

Open project in Eclipse

I received an java project, and I need to open it in Eclipse. I have a folder with the follow structure :

  Project :
           .classpath
           .project
           .settings
            src
            build 
            WebContent:
                      WEB-INF

I put it in the workspace directory but the eclipse does not show me the project. I have open the .classpath file and i see a lot of for example :

<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
<classpathentry kind="lib" path="C:/J2EE/glassfishv3/glassfish/modules/javax.servlet.jar"/><classpathentry kind="lib" path="C:/J2EE/glassfishv3"/>
<classpathentry kind="lib" path="C:/Mail/mail.jar"/> 

I do not have the last three path in my machine . So my question is what should i do ?

Upvotes: 1

Views: 362

Answers (4)

dhblah
dhblah

Reputation: 10161

You should create folder, eg. MyWorkspace, place your eclipse project in it. Then fire up eclipse, when It'll ask for your workspace folder, enter your MyWorkspace full path (use browse button). Then eclipse will begin starting. After its loading will complete, select 'Add' -> new Project, then in the 'new Project' window enter as a project name, name of the project you've received, at the moment when you completely type your project name, all fields will became grayed, this means that your existing project will be used, press next, then complete your project set-up. Cheers.

Upvotes: 0

Zsolt T&#246;r&#246;k
Zsolt T&#246;r&#246;k

Reputation: 10439

It is not enough to put the project folder inside the Eclipse workspace, it won't be picked up that way.

The recommended way of importing an Eclipse project is to go through the File > Import... > General > Existing projects into workspace... wizard. Don't copy the project folder into the workspace, point to its original location instead; if you select the Copy projects into workspace checkbox, the imported project will be automatically copied into your workspace.

Upvotes: 1

soulcheck
soulcheck

Reputation: 36777

If you already copied it into the worskpace folder, there's no need to import.

Just do the following:

File -> new -> project -> dynamic web project -> Put the name of the project folder.

Eclipse will autodetect existing project setup and put it in workspace.

Upvotes: 0

Wyzard
Wyzard

Reputation: 34581

There's an Import command on the file menu.

You shouldn't manually put the project in your workspace folder; Eclipse will copy it there when you import it.

Upvotes: 2

Related Questions