How to import NetBeans project into Eclipse
Few days ago, when I faced some issues with NetBeans IDE, I switched to Eclips. Now the problem was my work. Placing java files from one place to another seems easy. But preparing configuration file is really time-consuming. And as usual I avoid manual work. SO let’s see what I did to import NetBeans workspace into Eclipse without wasting time1
- There is a dist folder inside NetBeans workspace, containing a .war file. Import this war file into Eclipse. For this;
- Open eclips IDE > Go to File Menu => Import => War
- Above step will make package structure in Eclipse workspace similar to NetBeans. It’ll also prepare configuration file. Now you need to place source files only. For this
- Go to src folder inside NetBeans folder => Copy all contents => Place them to src folder inside NetBeans folder.
- Right click on Project name in right side panel of Eclipse IDE => Refresh
Your Eclipse workspace is prepared. If above trick doesn’t work for you refer another way;
2
OVERVIEW OF THE PROCESS
- Lets say you already have a NetBeans project created called MyProject and located at <PATH>\MyProject
- open NetBeans and change the project settings
- create a ZIP file of the <PATH>\MyProject\MyProject.zip
- create a new folder <PATH>\NEW (or your choice), this is where we are going to create the Eclipse Project
- open Eclipse create a new project and import the ZIP file
- create a new folder <PATH>\NEW\MyProject\dist(necessary for NetBeans)
- Now you can DECIDE when to work with Eclipse or NetBeans
DETAILED PROCESS
- Let’s say you already have a NetBeans project created called MyProject and located at <PATH>\MyProject
- open NetBeans
- open MyProject
- Right click MyProject and select Clean Project (this deletes the build/classed and dist folders)
- open the file project.properties located in the folder <PATH>\MyProject\nbproject
- change the build.dir to bin
- change the build.classed.dir to ${build.dir}
- save and close the file
close NetBeans
- create a ZIP file of the <PATH>\MyProject\MyProject.zip that will contain this folders:
- nbproject
- src
- Any other folder or file that is located at <PATH>\MyProject
- create a new folder <PATH>\NEW (or your choice), this is where we are going to create the Eclipse Project
- open Eclipse
- go to Window, Open Perspective, Java
- go to File, New, Project, Java Project
- click NEXT
- type MyProject
- select Create project at external location
- type <PATH>\NEW\MyProject (this folder will be created by ECLIPSE)
- select Create separate source and output folders
- click NEXT
- click FINISH
- Right click on MyProject (at the Package Explorer)
- select IMPORT
- select ZIP file (usually the last option on the list)
- click NEXT
- BROWSE and look for the <PATH>\MyProject\MyProject.zip created on STEP 3
- click FINISH
close Eclipse
- create a new folder <PATH>\NEW\MyProject\dist(necessary for NetBeans)
- Now you can DECIDE when to work with Eclipse or NetBeans
23082
views
views


vibha
6 Mar, 2012
thanks amit this was very usefull to me.
anup.mule
9 Apr, 2012
hi friend i have a project for training n placement i got it from y friend ot was in netbeans
not abl to run in ecllipse ITS URGENT MAN PLEASE HELP
Reboot
9 May, 2012
Thank you Amit =]