One other easy way of doing it would be as follows (if you have a simple NetBeans project and not using maven for example).
- In Eclipse, Go to File -> New -> Java Project
- Give a name for your project and click finish to create your project
- When the project is created find the source folder in NetBeans project, drag and drop all the source files from the NetBeans project to ‘src’ folder of your new created project in eclipse.
- Move the java source files to respective package (if required)
- Now you should be able to run your NetBeans project in Eclipse.