One other easy way of doing it would be as follows (if you have a simple NetBeans project and not using maven for example).
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.
sbt eclipse
from the project root directory. In Eclipse:
File>Import>General>Existing projects in Workspace
Browse until get the netbeans project folder > Finish
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.
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 !!
Source: Stackoverflow.com