Mac 上的 Java 开发 - Xcode、Eclipse 或 Netbeans

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

Java Development on a Mac - Xcode, Eclipse, or Netbeans

javaeclipsexcodemacosnetbeans

提问by geo

I've been using Xcode for the usual C/C++/ObjC development. I'm wondering what are practical considerations, opinions of Xcode, Eclipse or NetBeans usage on a Mac for Java development?

我一直在使用 Xcode 进行通常的 C/C++/ObjC 开发。我想知道在 Mac 上用于 Java 开发的 Xcode、Eclipse 或 NetBeans 使用的实际考虑因素、意见是什么?

Please don't include my current usage of Xcode in your analysis.

请不要在您的分析中包含我当前对 Xcode 的使用。

采纳答案by Derek

I like NetBeanson OS X for Java.

我喜欢OS X for Java 上的NetBeans

It seems like I spend more time configuring eclipse to get a decent java programming environment. With NetBeans the setup time is less and I can get down to programming quicker...

似乎我花了更多的时间来配置 eclipse 以获得一个像样的 java 编程环境。使用 NetBeans,设置时间更少,我可以更快地开始编程......

回答by Zarkonnen

Do not use Xcode - Java support in the later versions is very much lacking. Even Apple, who make it, suggest you use a different IDE. As for NetBeans and Eclipse, they both have their strengths and a large number of vocal followers. I suggest you try both and use whichever you find more comfortable.

不要使用 Xcode - 在更高版本中非常缺乏 Java 支持。即使是制造它的 Apple,也建议您使用不同的 IDE。至于 NetBeans 和 Eclipse,它们各有千秋,拥趸众多。我建议您尝试两者并使用您觉得更舒服的那个。

I for one use TextMateand shell scripts. But I'm strange.

我使用TextMate和 shell 脚本之一。但我很奇怪。

回答by Julien Grenier

I'll suggest Eclipse because it has a zillions plugins and is almost a standard for Java development. But I've heard that NetBeans is really nice since their latest release specially if you want to do desktop application(Swing) .

我会推荐 Eclipse,因为它有无数的插件并且几乎是 Java 开发的标准。但是我听说 NetBeans 非常好,因为他们的最新版本特别适合你想做桌面应用程序(Swing)。

I can't comment on Xcode since I haven't play with it.

我无法对 Xcode 发表评论,因为我没有玩过它。

回答by Will Hartung

Well, I can chime in with Netbeans, it seems to work really well. There are some function key issues that I believe has a solution, I just haven't solved it. I've been quite happy with Netbeans. I like its "all in one out of the box" nature over the pick and choose plug in nature of Eclipse, but that's just a matter of taste.

好吧,我可以加入 Netbeans,它似乎工作得很好。有一些功能关键问题我相信有解决方案,只是我还没有解决。我对 Netbeans 很满意。我喜欢它的“开箱即用”特性,而不是 Eclipse 的选择插件特性,但这只是品味问题。

回答by Simon

I would advocate Eclipseon the Mac for Java, mosly because I had a very good experience. I'm not going to bang on about its merits as an IDE, but here are some unexpected advantages I found:

我会提倡在 Mac 上为 Java 使用Eclipse,主要是因为我有很好的体验。我不打算谈论它作为 IDE 的优点,但我发现了一些意想不到的优点:

  1. When my employer switched IDE's to Eclipse I was way ahead.
  2. Pretty much any language I fancied trying out had a free IDE somewhere as an Eclipse plug-in, so I have a very consistent multi-language development environment.
  3. When I eventually went over to the Windows dark side I could use the same development environment, which was a huge relief.
  1. 当我的雇主将 IDE 切换到 Eclipse 时,我遥遥领先。
  2. 我想尝试的几乎任何语言都有一个免费的 IDE 作为 Eclipse 插件,所以我有一个非常一致的多语言开发环境。
  3. 当我最终转向 Windows 的阴暗面时,我可以使用相同的开发环境,这是一个巨大的解脱。

But this is a bit of a religious topic, so expect to get a whole bunch of different opinions

但这是一个有点宗教话题,所以期待得到一大堆不同的意见

回答by Daniel Spiewak

I've worked with both Eclipse CDT and NetBeans's C++ support, and I must say that in my experience CDT is far superior in both stability and in features. It's really impressive how well the CDT indexer works; the tooling is almost as good as Java's. I'm also a huge fan of JDT when compared with NetBeans for Java development. The workflow is just so much smoother, if only due to the incremental compiler (compile-on-save).

我使用过 Eclipse CDT 和 NetBeans 的 C++ 支持,我必须说,根据我的经验,CDT 在稳定性和功能方面都非常出色。CDT 索引器的工作性能令人印象深刻;该工具几乎和 Java 一样好。与用于 Java 开发的 NetBeans 相比,我也是 JDT 的忠实粉丝。如果仅仅是由于增量编译器(编译时保存),工作流程就更加顺畅。

One thing about NetBeans though, its UI does flow a little better in the "Mac style", which is ironic seeing as SWT was created to provide a morenative interface. The next release of Eclipse should be based on Cocoa (rather than Carbon, which is the current), but that won't be until next June.

不过,关于 NetBeans 的一件事是,它的 UI 在“Mac 风格”中的流动性确实要好一些,这具有讽刺意味,因为 SWT 的创建是为了提供原生的界面。Eclipse 的下一个版本应该基于 Cocoa(而不是当前的 Carbon),但要到明年 6 月才能实现。

Final note: the whole "in box" vs "plugins" issue is entirely moot and it has been since Eclipse Calisto (two years ago). Now, with P2 (the new update manager), it's dead easy to get different features in the IDE. I can start with a download and get a fully-functional JDT/CDT/Mylyn environment up and running within five minutes of installation (assuming a reliable internet connection).

最后一点:整个“in box”与“plugins”问题完全没有实际意义,自 Eclipse Calisto(两年前)以来一直存在。现在,有了 P2(新的更新管理器),在 IDE 中获得不同的功能非常容易。我可以从下载开始,并在安装后的五分钟内启动并运行功能齐全的 JDT/CDT/Mylyn 环境(假设互联网连接可靠)。

回答by Marc Bollinger

It depends what you want to do. My experience with Java on the Mac is about a year old by now, but NetBeans had a much better out-of-the-box support for Tomcat (in particular) deployment, and generally seemed to be a little more user friendly. For instance, the Netbeans beta I tried out used forms for web.xml configuration, in comparison to Eclipse's plain ol' XML editor (and in Europa, at least, the XML editor's row redrawing was a little sketchy on the Mac).

这取决于你想做什么。我在 Mac 上使用 Java 的经验到现在已经大约一年了,但是 NetBeans 对 Tomcat(特别是)部署有更好的开箱即用支持,并且通常似乎对用户更友好一些。例如,与 Eclipse 的纯 ol' XML 编辑器相比,我试用的 Netbeans beta 使用表单进行 web.xml 配置(至少在 Europa 中,XML 编辑器的行重绘在 Mac 上有点粗略)。

That said, for that project, I wound up doing a bit of configuration (for a was a n00b) in NetBeans, then moved the XML config files over to Eclipse, and developed the rest there. As others have mentioned, the zillions of plugins are great, and in general the experience is just very consistent. Especially if you have to work on another platform.

也就是说,对于该项目,我最终在 NetBeans 中进行了一些配置(因为 a 是 n00b),然后将 XML 配置文件移至 Eclipse,并在那里开发其余部分。正如其他人所提到的,无数的插件都很棒,总的来说,体验非常一致。特别是如果您必须在另一个平台上工作。

If Eclipse had better OS X bindings (does it have any? I'm unaware), I would use that for Obj-C development, as well.

如果 Eclipse 有更好的 OS X 绑定(有没有?我不知道),我也会将它用于 Obj-C 开发。

回答by Bill K

Just to be sure you give them fair consideration, Eclipse and Netbeans have gone back and forth for a while. Eclipse used to be a good deal quicker because they didn't use Swing.

为了确保您给予他们公平的考虑,Eclipse 和 Netbeans 已经来回走了一段时间。Eclipse 过去要快很多,因为他们没有使用 Swing。

Now Netbeans has caught up (perhaps surpassed) and has a lot of momentum.

现在Netbeans已经迎头赶上(或许被超越了),势头不减。

You will get more votes for Eclipse. Period. This is because it was better and more people use it--and it's just human nature to feel what you are using is the best and everyone should use it.

您将获得更多的 Eclipse 选票。时期。这是因为它更好,越来越多的人使用它——感觉你使用的东西是最好的,每个人都应该使用它,这只是人的天性。

Because it was better does not mean it's better now. Netbeans has more languages supported and more all-around support--so it's growing faster.

因为它更好并不意味着它现在更好。Netbeans 支持更多的语言和更全面的支持——所以它发展得更快。

Currently I use Eclipse--I've used both (and IntelliJ and TextMate and Notepad...) and I can tell you that Eclipse has exactly one feature over netbeans... Mylyn (it's been renamed, it used to be called Mylar). This thing is pretty damn cool, but few people seem to even know it exists.

目前我使用 Eclipse——我已经使用了两者(以及 IntelliJ 和 TextMate 和记事本......),我可以告诉你 Eclipse 与 netbeans 相比只有一个功能...... Mylyn(它已被重命名,它曾经被称为 Mylar )。这东西非常酷,但似乎很少有人知道它的存在。

So, if you don't know a bunch of keystrokes that already tie you to an editor, the up and coming is Netbeans--don't pass it up because of a bunch of Eclipse votes.

因此,如果您不知道已经将您与编辑器联系在一起的一系列击键,那么即将到来的是 Netbeans —— 不要因为一堆 Eclipse 投票而放弃它。

Better yet, get good with both--it can't hurt and makes me a lot more comfortable when a company requires one or another. Don't whine when they make you change.

更好的是,两者兼得——当公司需要一个或另一个时,它不会受到伤害并且让我更舒服。当他们让你改变时,不要抱怨。

回答by extraneon

I happen to use Eclipse on my Mac (actually EasyEclipse which comes preconfigured with the most important plugins) and I must say it runs great. I have a less positive experience on Linux though.

我碰巧在我的 Mac 上使用 Eclipse(实际上是 EasyEclipse,它预先配置了最重要的插件),我必须说它运行得很好。不过,我对 Linux 的体验不太积极。

I have also used NetBeans 6 recently and I was very impressed. It seems to have more functionality build-in. Most of the functionality is undoubtedly also available as an Eclipse plugin though, if you can find it.

我最近也使用了 NetBeans 6,印象非常深刻。它似乎内置了更多功能。大多数功能无疑也可以作为 Eclipse 插件使用,如果你能找到的话。

Currently I have the impression that if you start developing Swing, Netbeans is your best option. Otherwise, Netbeans or Eclipse with a handy set of plugins are both excellent options.

目前我的印象是,如果您开始开发 Swing,Netbeans 是您的最佳选择。否则,带有一组方便的插件的 Netbeans 或 Eclipse 都是很好的选择。

If you do check out eclipse, give a thought to EasyEclipse (free) or perhaps even MyEclipse (not free). They come with the most usefull plugins preinstalled.

如果您确实查看了 eclipse,请考虑使用 EasyEclipse(免费)或什至 MyEclipse(非免费)。它们预装了最有用的插件。

回答by bpapa

If you're using Eclipse, be sure to use Ganymede (3.4) or later. They run great. The previous version (Europa) ran poorly on my Macbook Pro.

如果您使用 Eclipse,请务必使用 Ganymede (3.4) 或更高版本。他们跑得很好。以前的版本 (Europa) 在我的 Macbook Pro 上运行不佳。