Reputation: 1581
I want to get my NetBeans project to Eclipse. It's a web application project.
I imported war files into Eclipse but I am not able to get the Java files and the war files are giving me many errors. What is the best way to import the whole project?
Upvotes: 43
Views: 117426
Reputation: 139
In Eclipse:
File>Import>General>Existing projects in Workspace
Browse until get the netbeans project folder > Finish
Upvotes: 1
Reputation: 4132
There's a very easy way if you were using a web application just follow this link.
just do in eclipse :
File > import > web > war file
Then select the war file of your app :)) very easy !!
Upvotes: 4
Reputation: 319
Sharing my experience, how to import simple Netbeans java project into Eclipse workspace. Please follow the following steps:
Create .project file, inside the project folder at root level. Below code is the sample reference. Change your project name appropriately.
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>PROJECT_NAME</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
Now open Eclipse and follow the steps,
File > import > Existing Projects into Workspace > Select root directory > Finish
Now we need to correct the build path for proper compilation of src, by following these steps:
Right Click on project folder > Properties > Java Build Path > Click Source tab > Add Folder
(Add the correct src path from project and remove the incorrect ones). Find the image ref link how it looks.
Upvotes: 13
Reputation: 319
One other easy way of doing it would be as follows (if you have a simple NetBeans project and not using maven for example).
Upvotes: 31
Reputation: 13686
sbt eclipse
from the project root directory. Upvotes: 2
Reputation: 208994
You should be using Maven, as the structure is standardized. To do that (Once you have created your Maven project in Netbeans, just
As long as the project has no errors, I usually get none transferring to eclipse. This works for Maven web projects and regular projects.
Upvotes: 11