问题
My company wants to migrate to Eclipse, I was wondering what options besides an Ant build are there to move our projects from Netbeans to Eclipse.
回答1:
I have recently 'migrated' from Netbeans to Eclipse and found it amazingly easy. The reason it was easy though is that all of our projects are IDE independent standard ant and ivy build scripts that most modern IDE's can understand. This way, we all get to use the IDE we like (yes - emacs and vi too) and their are no 'migration' issues.
The reason that I am pointing that out is that, if it is not already that way, I would recommend that you take that same path on your migration. Just create some standard ant (and ivy) build scripts. Eclipse knows how to slurp those in and there will be no future migration issues.
回答2:
Tooooo ... oooo .... oooo late to answer but this works
http://www.coderanch.com/t/458555/vc/Export-Netbeans-Eclipse
i was looking for an answer my self and saw this question :)
Quoting:
Here is a little tutorial on "Importing projects from NetBeans to Eclipse".
Please try this:
PART I - NETBEANS
- Open NebBeans.
- Create a java project named "ToEclipse".
- Build this project.
Then, NetBeans has created several folders. The important folders to us are (in my computer):
c:\User\Almir\NetBeans\ToEclipse\dist
c:\User\Almir\NetBeans\ToEclipse\src
PART II - ECLIPSE
- Go to Eclipse.
- Create a java project in Eclipse named "ToEclipse".
Then, Eclipse has created several folders. The important folders to us are (in my computer):
c:\Users\Almir\Eclipse\ToEclipse\bin
c:\Users\Almir\Eclipse\ToEclipse\src
PART III - WINDOWS EXPLORER
- Go to Windows Explorer.
- Copy the FILE "ToEclipse.jar" at
c:\Users\Almir\Eclipse\ToEclipse\bin
folder.- Past it in
c:\Users\Almir\Eclipse\ToEclipse\bin
- Copy the FOLDER "toeclipse" at
c:\User\Almir\NetBeans\ToEclipse\src
folder. Past it in b)c:\Users\Almir\Eclipse\ToEclipse\src
folder.PART IV - ECLIPSE
- Go to Eclipse.
- Press
F5
to refresh the view.- Verify that your project is there (under
ToEclipse/src/toeclipse
).- Say "Oh! Yes! It works!".
- Run the project.
- Return to 3) how many times you want!
I hope that helps you!
Kind regards, Almir Campos São Paulo, Brazil.
回答3:
I found another easier way that worked for me at least since I had problems importing the Ant build script due to a missing javac.
Say you have your Netbeans project (src, build, dist etc) in D:/blah/

In Eclipse go to File->New->Java Project
Uncheck 'Use default location' and instead use the path where the Netbeans project is (D:/blah/) Eclipse should automatically populate everything else and link to the files as well.

回答4:
in MY PERSONAL experience, it was easy. I was migrating a java desktop app from netbeans to eclipse. Just copy my projects into the workspace, create the project in eclipse as a new java project and put the same name of the project in netbeans (use your workspace as location). It will recognize the project structure ( Eclipse Helios, Netbeans 6.8 )
Hope this helps. I don't know how hard it turns if you have another kind of project.
回答5:
I just migrated a Netbeans 7.0 JSF web project to Eclipse. And it was easier than i would have imagined. What i did was:
- List item
- Clean and build my JSF application in netbeans
- Close netbeans and open Eclipse(i use galileo)
- Create a new Dynamic Web Application.
- Right click on the new web application in project explorer and go to import then to .WAR file
- It then ask whether i want to import any of the jar files(libraries) as projects and i do not select any and just click finish.
- Copied my netbeans src(source) folder /src/java/ to the Eclipse src folder. e.g netbeansproject/medman/src/java/com to eclipseSpace/medman/src/
- Next setup your server in Eclipse(i use tomcat 6.0).
And voila! it is done.
You can also check out this link. http://www.coderanch.com/t/458555/vc/Export-Netbeans-Eclipse
回答6:
At my company people pretty much use either eclipse or Netbeans. I myself use both of them for various tasks. We write our own ant scripts to build and package our source so it does not matter what IDE a person uses. I would suggest that you create your own ant script to build your source, that way you won't have to depend on an IDE specific build script.
来源:https://stackoverflow.com/questions/836647/migrating-from-netbeans-to-eclipse