Chillax
Chillax

Reputation: 4698

How to import a Java project to Eclipse?

I was trying to export a Java project. I was able to create a JAR file by using the option Export -> Java -> JAR file. I am not able to import this jar file into Eclipse (no import option for java). Am I doing anything wrong here?

Using Eclipse Java EE IDE for Web Developers (Version: Juno Release)

Upvotes: 17

Views: 103209

Answers (7)

user3425243
user3425243

Reputation:

Go to

File-> import Now type " existing in the search bar" Click on "import existing project into workspace" select root folder of your project

click ok to import

For video help visit https://www.youtube.com/watch?v=wsMPhZTxiF4

Upvotes: 2

Apfelsaft
Apfelsaft

Reputation: 5846

There is a simplier way than exporting and importing the jar. Lets assume your project is named MyProject123. Just:

  1. Just open the workspace with your file manager,
  2. Copy the folder MyProject123 that contains the project and paste it in an other workspace.
  3. Open eclipse and create a new Java Project named MyProject123

Eclipse will recognize that there is a project with that name in the workspace and will import it. All you have to do is to make refresh (press F5) on the new project.

Upvotes: 34

codegeek
codegeek

Reputation: 11

this the step u can apply to do that so.

Import Project -> JavaEE -> App Client Jar File -> Browse and select jar -> OK

Upvotes: 1

happy
happy

Reputation: 2628

You can import jar file from Eclipse File->Import->General->Archive File

Upvotes: 0

k_ssup
k_ssup

Reputation: 348

File -> Import -> General -> Archive File

This will import your project in Eclipse.

Also, you will need to add libs/jars externally by configuring your buildpath.

Upvotes: 0

Ashutosh Jindal
Ashutosh Jindal

Reputation: 18869

To be able to import the project back instead of using JAR, try using 'Archive File' as follows.

Export to Archive

File -> Export...

Choose General -> Archive File as the export type like so :

enter image description here

and then,

enter image description here

Import back from the above archive

File -> Import...

Choose General -> Archive File and then set it up as follows :

enter image description here

Upvotes: 8

Nandkumar Tekale
Nandkumar Tekale

Reputation: 16158

Follow follwing Steps :

Import Project -> JavaEE -> App Client Jar File -> Browse and select jar -> OK

You are done.

Upvotes: 3

Related Questions