如果我只想在其中使用 Java,那么 Eclipse 和 Netbeans 之间有什么区别?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/330027/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-11 13:31:30  来源:igfitidea点击:

What is the difference between Eclipse and Netbeans if I want to use only the Java in it?

javaeclipsenetbeansvista64

提问by

I recently got a Dell XPS 64-bit Vista for myself. Eclipse doesn't have their 64-bit version, but I've read on forums that they download Eclipse and work with Java 1.5 on the Vista with only some problems. I have Java 1.6 and Netbeans was easily downloadable.

我最近为自己买了一台戴尔 XPS 64 位 Vista。Eclipse 没有他们的 64 位版本,但我在论坛上读到他们下载 Eclipse 并在 Vista 上使用 Java 1.5,但只有一些问题。我有 Java 1.6 并且 Netbeans 很容易下载。

What's the basic/big difference that I'll notice if I shift to Netbeans from Eclipse now?

如果我现在从 Eclipse 转移到 Netbeans,我会注意到的基本/大区别是什么?

回答by SCdF

I think it will be mostly culture shock. Things in different places. Features named different things.

我认为这主要是文化冲击。不同地方的东西。功能命名不同的东西。

If you really want to give Netbeans a try force yourself to use it for a month. It will suck for the first day or so as none of the shortcuts will be the same, various idioms will be different etc.

如果您真的想尝试使用 Netbeans,请强迫自己使用它一个月。第一天左右会很糟糕,因为没有任何快捷方式是相同的,各种习语会有所不同等。

At the end of the month you will be competent enough in it that these things should have gone away and you can objectively decide if you like it more. (I'm currently trying this with IntelliJ btw. Current state, confused ;-)

到了月底,你将有足够的能力,这些事情应该都消失了,你可以客观地决定是否更喜欢它。(顺便说一句,我目前正在用 IntelliJ 尝试这个。当前状态,很困惑;-)

回答by LenW

The build system is different. Eclipse has an internal build mechanism whilst NetBeans relies on ant.

构建系统不同。Eclipse 具有内部构建机制,而 NetBeans 依赖于 ant。

回答by Fernando Miguélez

Maybe when you work with several (many) projects at the same time I would prefer Eclipse (Workspace organization is great for that). Interface seems to respond better (at least vs old versions of NetBeans such as 5.0) in Eclipse too. This is related to SWT vs Swing performance issues, though the differences are no so big as on Java 1.4 days.

也许当您同时处理多个(许多)项目时,我更喜欢 Eclipse(工作区组织非常适合)。接口在 Eclipse 中的响应似乎也更好(至少与 NetBeans 的旧版本(如 5.0)相比)。这与 SWT 与 Swing 的性能问题有关,尽管差异没有 Java 1.4 天那么大。

However I would say Netbeans is a better integrated IDE, you launch/debug applications the same way no matter you are developing a desktop application or a JSP/Servlet web application. Building relies entirely (since version 4 I think) on Ant, and Netbeans launches/adds ant target transparently. Ant in Eclipse has the same level of integration as a pair of bull horns sticked to the front of your car.

但是我会说 Netbeans 是一个更好的集成 IDE,无论您是在开发桌面应用程序还是 JSP/Servlet Web 应用程序,您都可以以相同的方式启动/调试应用程序。构建完全依赖于(我认为是从第 4 版开始)Ant,而 Netbeans 透明地启动/添加 ant 目标。Eclipse 中的 Ant 具有与粘在汽车前部的一对牛角相同的集成级别。

Eclipse is more extensible than Netbeans but the last is more uniform.

Eclipse 比 Netbeans 更具可扩展性,但后者更统一。

回答by James Schek

What is the difference between Coke and Pepsi?

可乐和百事可乐有什么区别?

Ok, it's not really that similar, but a lot of the differences are in qualitative ways. Speaking of Netbeans 6.1 and 6.5:

好吧,其实并没有那么相似,但是很多差异都存在于定性方面。说到 Netbeans 6.1 和 6.5:

  • Netbeans has a very different UI and workflow. There are no perspectives, but toolbars and such will auto appear/hide as needed (i.e. debugging). Build process is different. Managing projects is different.

  • Netbeans focuses on a smooth, integrated experience sometimes at the expense of features. The Profiler is fully integrated into the editor (context menu's let you quickly manipulate the profiler), but is lacking some featuers of Eclipse profilers.

  • Netbeans has a tightly integrated JSP/Servlet/JSF development environment. The whole workflow connects together from development, debugging, deployment. This is more of a "feel" than anything else.

  • Netbeans editor is missing several Eclipse features. Spell check being one prominent one. Quick complete (Ctrl-K, Ctrl-J) is an underused Netbeans feature. Snippets being another (though they have an auto-complete template which fills a different, but similar niche).

  • Less choice. If you don't like one of the included tools, it's unlikely you will find a good alternative plug-in.

  • Matisse. Eclipse GUI editors have started to catch up, but they are simply no comparison to Matisse. Superficially, they seem equivalent...

  • <sarcasm>Your friends will make fun of you.</sarcasm>

  • Netbeans 具有非常不同的 UI 和工作流程。没有透视图,但工具栏等会根据需要自动显示/隐藏(即调试)。构建过程不同。管理项目是不同的。

  • Netbeans 有时会以牺牲功能为代价,专注于流畅、集成的体验。Profiler 完全集成到编辑器中(上下文菜单让您可以快速操作分析器),但缺少 Eclipse 分析器的一些特征。

  • Netbeans 具有紧密集成的 JSP/Servlet/JSF 开发环境。整个工作流程从开发、调试、部署连接在一起。这更像是一种“感觉”。

  • Netbeans 编辑器缺少几个 Eclipse 功能。拼写检查是一项突出的检查。快速完成(Ctrl-K、Ctrl-J)是一项未充分利用的 Netbeans 功能。片段是另一个(尽管它们有一个自动完成的模板,可以填充不同但相似的利基)。

  • 选择较少。如果您不喜欢其中的一个工具,您就不太可能找到一个好的替代插件。

  • 马蒂斯。Eclipse GUI 编辑器已经开始迎头赶上,但它们根本无法与 Matisse 相提并论。从表面上看,它们似乎是等价的......

  • <sarcasm>你的朋友会取笑你。</sarcasm>

回答by Olivier

Sad to say, you also quickly discover that Netbeans is far more unstable than Eclipse. I give a serious try (more than one month ;)) to 6.1 and that was the more noticeable "feature" for me. Sometimes, a simple mouvement of the mouse is enough to kill the application. They made huge progress since 5.x, but imho, Netbeans is still far behind Eclipse.

遗憾的是,您很快就会发现 Netbeans 远比 Eclipse 不稳定。我对 6.1 进行了认真的尝试(一个多月;)),这对我来说是更显着的“功能”。有时,一个简单的鼠标移动就足以杀死应用程序。他们自 5.x 以来取得了巨大进步,但恕我直言,Netbeans 仍然远远落后于 Eclipse。

回答by wesleycoelho

The popular Mylynproductivity tool is a key feature that is only available in Eclipse.

流行的Mylyn生产力工具是一项仅在 Eclipse 中可用的关键特性。

A Joel on Software forum participant wrote: "I've been drawn to Eclipse by a few features, notably: Mylyn, and would like to try it out." http://discuss.joelonsoftware.com/default.asp?joel.3.703449

一位 Joel on Software 论坛参与者写道:“我被 Eclipse 的一些功能所吸引,特别是:Mylyn,并想尝试一下。” http://discuss.joelonsoftware.com/default.asp?joel.3.703449

Mylynprovides integrated access to your bug and issue tracker. When you work on a bug or issue, Mylyn focuses the Eclipse UI on only the code that is relevant for the task at hand.

Mylyn提供对错误和问题跟踪器的集成访问。当您处理错误或问题时,Mylyn 将 Eclipse UI 集中在与手头任务相关的代码上。

回答by wesleycoelho

Why not use both ?

为什么不同时使用?

I like netbeans Profiling tools muchbetter than eclipse's as they work straight out of the box on Linux.

我喜欢NetBeans性能分析工具,比Eclipse的更好,因为他们的工作直出在Linux上的方块。

Eclipse I use for normal editing, the mylin tools really help you work in a task oriented way.

我用于普通编辑的 Eclipse,mylin 工具确实可以帮助您以面向任务的方式工作。

Netbeans supports the import of eclipse projects so you can go along with both IDE's working on a single project if you need to.

Netbeans 支持导入 eclipse 项目,因此您可以根据需要在单个项目上使用两个 IDE。

回答by rwallace

The basic workflow of Netbeans is much smoother and more reliable; little things like ^X to cut current line work properly. It's also simple enough to understand what it's doing.

Netbeans 的基本工作流程更加流畅和可靠;像 ^X 这样的小东西可以正常工作。它也很简单,可以理解它在做什么。

otoh, Eclipse has the emacs quality of being a platform in its own right; some people swear by that.

哦,Eclipse 本身就具有作为平台的 emacs 品质;有些人发誓。

Edit: I've changed my mind, on coming across HyperAssist: https://bugs.eclipse.org/bugs/show_bug.cgi?id=159157

编辑:在遇到 HyperAssist 时,我改变了主意:https://bugs.eclipse.org/bugs/show_bug.cgi ?id =159157

Quite simply, the HyperAssist plugin fills in the missing piece that kept Eclipse from the gold medal; with it, Eclipse is the best IDE I've ever used.

很简单,HyperAssist 插件填补了 Eclipse 无法获得金牌的缺失部分;有了它,Eclipse 是我用过的最好的 IDE。

回答by Stephen

I've been recently trying Netbeans 6.5 and have found/understand:

我最近一直在尝试 Netbeans 6.5 并发现/理解:

  • Netbeans has better new language support (as it is the "reference" IDE/implementation for new technologies)
  • Similar to above, but Eclipse stilldoesn't have 1-1 generic compatibility with sun's javac or an option to "make it compatible" (Eclipse is too smart about inferring types - correct, but no good if your build machine can't make it)
  • No immediate need for plugins - subversion (and Mercurial?) are built in, and since it integrates nicely with ant, I find less need for Ivy etc plugins.
  • Multiple classpaths - you have compile time, run time, test compile time and test run-time. This means if you add something as a test dependency (that your build script knows about), it will not be visible to the main code. Again, very good for IDE / build server consistency.

  • Marker navigation is through the task list rather than through the current file.

  • Netbeans is wayslower in updating markers (presumably due to ant compilation rather than eclipse's triple compiler). This causes huge problems when trying to quickly navigate and fix task markers.
  • Netbeans 有更好的新语言支持(因为它是新技术的“参考”IDE/实现)
  • 与上面类似,但 Eclipse仍然没有与 sun 的 javac 的 1-1 通用兼容性或“使其兼容”的选项(Eclipse 在推断类型方面太聪明了 - 正确,但如果你的构建机器不能它)
  • 无需立即使用插件 - 内置了 subversion(和 Mercurial?),并且由于它与 ant 很好地集成,我发现对 Ivy 等插件的需求较少。
  • 多个类路径 - 您有编译时间、运行时间、测试编译时间和测试运行时间。这意味着如果你添加一些东西作为测试依赖(你的构建脚本知道),它对主代码是不可见的。同样,非常有利于 IDE/构建服务器的一致性。

  • 标记导航是通过任务列表而不是通过当前文件。

  • NetBeans是方式在更新标记(大概是由于蚂蚁编译,而不是Eclipse的三重编译)慢。在尝试快速导航和修复任务标记时,这会导致巨大的问题。