Link to home
Start Free TrialLog in
Avatar of Edgar Cole
Edgar ColeFlag for United States of America

asked on

How can I import a NetBeans Java project into Eclipse?

I created a Java project in NetBeans 8.0.2 which I would like to export so that my brother can import it into Eclipse. I'm not sure which version of eclipse he's using, but he downloaded it within the last three or four months. Can I accomplish this by exporting the project from NetBeans and imported into Eclipse, or is it more complicated than that?
Avatar of bigeven2002
bigeven2002
Flag of United States of America image

Hello,
For importing NetBeans into Eclipse, I did some quick research and found a possible answer.  I assume this is a web project as the steps below may only work for it.

Inside the NetBeans program folder there is a folder called "dist".  Open that and check to see if there is a .war file in there.  If so, then in Eclipse, go to File > Import > war.  Point to the location of the .war file within NetBeans folder.

This should create a package structure in the Eclipse workspace and will generate a config file.  Afterwards, go to the NetBeans folder again and there should be a subfolder called "src".  Copy the contents in that folder and paste them into the "src" folder inside the Eclipse program folder.

Then in the Eclipse program, right-click the project name and choose Refresh.

Hope this helps.
If its a maven project, I imagine it might be easier.
ASKER CERTIFIED SOLUTION
Avatar of Edgar Cole
Edgar Cole
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Edgar Cole

ASKER

Although bigeven2002's solution would probably work for a web application, I believe my question made it clear that I was asking about a Java application. Additionally, the solution I found is more automated and, I suspect, more generic – that is, would work regardless of the type of project.