从 NetBeans 迁移到 Eclipse
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/836647/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Migrating From NetBeans to Eclipse
提问by Randin
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.
我的公司想要迁移到 Eclipse,我想知道除了 Ant 构建之外还有哪些选项可以将我们的项目从 Netbeans 迁移到 Eclipse。
采纳答案by Shane C. Mason
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.
我最近从 Netbeans“迁移”到了 Eclipse,发现它非常简单。之所以简单,是因为我们所有的项目都是大多数现代 IDE 可以理解的独立于 IDE 的标准 ant 和 ivy 构建脚本。通过这种方式,我们都可以使用我们喜欢的 IDE(是的 - emacs 和 vi 也是如此)并且它们不存在“迁移”问题。
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.
我指出这一点的原因是,如果还不是这样,我建议您在迁移时采用相同的路径。只需创建一些标准的 ant(和 ivy)构建脚本。Eclipse 知道如何吸收这些内容,并且将来不会出现迁移问题。
回答by Basit Anwer
Tooooo ... oooo .... oooo late to answer but this works
Toooo ... oooo .... oooo 迟到了,但这是有效的
http://www.coderanch.com/t/458555/vc/Export-Netbeans-Eclipse
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.
这是一个关于“将项目从 NetBeans 导入 Eclipse”的小教程。
请试试这个:
第一部分 - NETBEANS
- 打开 NebBeans。
- 创建一个名为“ToEclipse”的 java 项目。
- 构建这个项目。
然后,NetBeans 创建了几个文件夹。对我们来说重要的文件夹是(在我的电脑中):
c:\User\Almir\NetBeans\ToEclipse\dist
c:\User\Almir\NetBeans\ToEclipse\src
第二部分 - 日食
- 转到 Eclipse。
- 在 Eclipse 中创建一个名为“ToEclipse”的 java 项目。
然后,Eclipse 已经创建了几个文件夹。对我们来说重要的文件夹是(在我的电脑中):
c:\Users\Almir\Eclipse\ToEclipse\bin
c:\Users\Almir\Eclipse\ToEclipse\src
第三部分 - WINDOWS 资源管理器
- 转到 Windows 资源管理器。
- 复制文件
c:\Users\Almir\Eclipse\ToEclipse\bin
夹中的文件“ToEclipse.jar” 。- 过去
c:\Users\Almir\Eclipse\ToEclipse\bin
- 将文件夹“toeclipse”复制到文件
c:\User\Almir\NetBeans\ToEclipse\src
夹中。将其粘贴到 b)c:\Users\Almir\Eclipse\ToEclipse\src
文件夹中。第四部分 - 日食
- 转到 Eclipse。
- 按
F5
刷新视图。- 验证您的项目是否存在(在 下
ToEclipse/src/toeclipse
)。- 说“哦!是的!它有效!”。
- 运行项目。
- 返回3)你想要多少次!
我希望对你有帮助!
亲切的问候,Almir Campos S?o Paulo,巴西。
回答by FearlessHyena
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.
我找到了另一种更简单的方法,至少对我有用,因为由于缺少 javac,我在导入 Ant 构建脚本时遇到了问题。
Say you have your Netbeans project (src, build, dist etc) in D:/blah/
假设您在D:/blah/ 中有您的 Netbeans 项目(src、build、dist 等)
In Eclipse go to File->New->Java Project
在 Eclipse 中转到 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.
取消选中“使用默认位置”,而是使用 Netbeans 项目所在的路径 ( D:/blah/) Eclipse 应自动填充其他所有内容并链接到文件。
回答by Ron
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 )
根据我的个人经验,这很容易。我正在将一个 java 桌面应用程序从 netbeans 迁移到 eclipse。只需将我的项目复制到工作区,在 eclipse 中创建该项目作为一个新的 java 项目,并将项目的相同名称放在 netbeans 中(使用您的工作区作为位置)。它将识别项目结构(Eclipse Helios、Netbeans 6.8)
Hope this helps. I don't know how hard it turns if you have another kind of project.
希望这可以帮助。我不知道如果你有另一种项目,它会变得多难。
回答by Stephen
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:
我刚刚将一个 Netbeans 7.0 JSF Web 项目迁移到 Eclipse。这比我想象的要容易。我所做的是:
- 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).
- 项目清单
- 在 netbeans 中清理和构建我的 JSF 应用程序
- 关闭 netbeans 并打开 Eclipse(我使用伽利略)
- 创建一个新的动态 Web 应用程序。
- 右键单击项目资源管理器中的新 Web 应用程序,然后导入到 .WAR 文件
- 然后它询问我是否想将任何 jar 文件(库)作为项目导入,我不选择任何并单击完成。
- 将我的 netbeans src(source) 文件夹 /src/java/ 复制到 Eclipse src 文件夹。例如 netbeansproject/medman/src/java/com 到 eclipseSpace/medman/src/
- 接下来在 Eclipse 中设置您的服务器(我使用 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
您也可以查看此链接。http://www.coderanch.com/t/458555/vc/Export-Netbeans-Eclipse
回答by Mr. Will
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.
在我公司,人们几乎使用 eclipse 或 Netbeans。我自己将它们用于各种任务。我们编写自己的 ant 脚本来构建和打包我们的源代码,因此人们使用什么 IDE 并不重要。我建议您创建自己的 ant 脚本来构建源代码,这样您就不必依赖于特定于 IDE 的构建脚本。