Java 开发的最佳操作系统?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/256169/
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
Best OS for java development?
提问by vaske
What is the best OS for Java development? People from Sun are pushing the Solaris, yes Solaris have some extra features included in itself such as (dTrace, possibility for Performance tuning the JVM, etc.. ). Some friends of mine, had port their application on solaris, and they said to me that the performances was brilliant. I'm not happy with switching my OS, and use Solaris instead.
什么是 Java 开发的最佳操作系统?Sun 的人正在推动 Solaris,是的 Solaris 本身包含一些额外的功能,例如(dTrace,性能调整 JVM 的可能性等。)。我的一些朋友,把他们的应用程序移植到了solaris上,他们对我说表演很精彩。我对切换操作系统不满意,而是使用 Solaris。
What were your experiences?
你有什么经历?
采纳答案by bendin
Of the three I've used (Mac OS X, Linux, Windows), I consider Linux the best place to do Java development.
在我使用过的三个(Mac OS X、Linux、Windows)中,我认为 Linux 是进行 Java 开发的最佳场所。
My primary personal machine is a Mac, and I've done quite a lot of Java development there and been happy with it. Unfortunately, however, Apple lags behind the official JDK releases and you're pretty much limited to the few versions they choose to provide.
我的主要个人机器是 Mac,我在那里做了很多 Java 开发并且对它很满意。然而不幸的是,Apple 落后于官方 JDK 版本,而且您几乎只能使用他们选择提供的少数几个版本。
My employer-provided machine is an old P4 crate from HP which I use mostly to keep my feet warm. The real work occurs "Oberon", on a 2.6 GHz quad-core running Ubuntu 8.04in 32-bit mode [1]. The two advantages I notice day-to-day compared with Windows are:
我的雇主提供的机器是 HP 的一个旧 P4 板条箱,我主要用它来保持双脚温暖。真正的工作发生在“Oberon”上,在 32 位模式下运行Ubuntu 8.04的 2.6 GHz 四核[1]。与 Windows 相比,我每天注意到的两个优点是:
- A powerful command line, which helps me automate the boring little stuff.
- Farsuperior file system performance. (I'm currently using EXT3 because I'm becoming conservative in my old age. I used ReiserFS previously, which was even faster for the sorts of operations one typically performs on large workspaces checked out of subversion.)
- 一个强大的命令行,它帮助我自动化无聊的小东西。
- 远超卓越的文件系统性能。(我目前正在使用 EXT3,因为我在晚年变得保守。我以前使用过 ReiserFS,对于通常在检查出颠覆的大型工作区上执行的各种操作,它甚至更快。)
You can get those advantages from a mac too, but Linux offers another nice bonus:
你也可以从 mac 上获得这些优势,但 Linux 提供了另一个不错的好处:
- Remote X11: Before my $EMPLOYER provided e-mail and calendar via web, I had to be on the Windows box to read my mail and see my meetings, so I used Cygwin's X11. This allowed my to run the stuff on Linux but display it on my windows desktop.
- 远程 X11:在我的 $EMPLOYER 通过 Web 提供电子邮件和日历之前,我必须在 Windows 机器上阅读邮件和查看我的会议,所以我使用了 Cygwin 的 X11。这允许我在 Linux 上运行这些东西,但在我的 Windows 桌面上显示它。
[1] I used to run Ubuntu in 64-bit mode, but I had no end of trouble. (Mixing 64-bit and 32-bit is something Mac OS X does muchbetter.) 7.04 worked fine running 32-bit applications on the 64-bit kernel. 7.10 broke the linux32
script and the ability to install new 32-bit applications though old ones continued to (mostly) run. 8.04 killed 32-bit java by making it impossible to connect to the network from a 32-bit JVM (no more updates for Eclipse). Running Eclipse 64-bit didn't work reliably. The then current version of oXygen would only run (grudgingly) under the IBM 64-bit VM which would work for about 10 minutes until it stopped getting keyboard events. I finally gave up in frustration and used my Mac for a few months until I had enough slack time to do a 32-bit install of 8.04 on the linux box. Now everything works again and I'm quite happy.
[1] 我曾经在 64 位模式下运行 Ubuntu,但我没有尽头。(混合64位和32位的东西Mac OS X的做多好。)的64位内核7.04工作正常运行32位应用程序。7.10打破了linux32
脚本和安装新的 32 位应用程序的能力,尽管旧的应用程序继续(大部分)运行。8.04 使 32 位 java 无法从 32 位 JVM 连接到网络(Eclipse 不再更新),从而杀死了 32 位 java。运行 Eclipse 64 位并不可靠。当时的 oXygen 版本只能(勉强)在 IBM 64 位 VM 下运行,该 VM 将运行大约 10 分钟,直到它停止获取键盘事件。我最终沮丧地放弃了并使用了我的 Mac 几个月,直到我有足够的空闲时间在 linux 机器上进行 8.04 的 32 位安装。现在一切正常,我很高兴。
回答by Peter M
I have had success before doing Java development in Windows with Eclipse. Sounds like you are also asking about deployment/hosting. Whichever OS is best to run your application on should not really predicate what OS you use to develop the application.
在使用 Eclipse 在 Windows 中进行 Java 开发之前,我已经取得了成功。听起来您也在询问部署/托管。无论哪种操作系统最适合运行您的应用程序,都不应真正断定您用于开发应用程序的操作系统。
回答by Dave Hillier
Personally, I would not bother. I would use the platform that best supports the development tools and target platform that you use.
就个人而言,我不会打扰。我会使用最能支持您使用的开发工具和目标平台的平台。
Why do you need to tune the JVM? This is a very unusual thing to want to do. Would you be better writing in a lower level language like C++?
为什么需要调优JVM?这是一件非常不寻常的事情。你会用像 C++ 这样的低级语言写得更好吗?
Dtrace is available for OS X, there is a linux port too. Solaris has historically had a reputation for being slow (hence the Slowaris nickname). I'm not sure if this is still true.
Dtrace 可用于 OS X,也有一个 linux 端口。Solaris 历来以速度慢着称(因此有 Slowaris 的昵称)。我不确定这是否仍然正确。
回答by VonC
"development" ?
“发展” ?
I believe you should stick to the OS you are the most comfortable with, or which is the most available to a large group (of developers), like for instance a set of PCs on Windows.
我相信您应该坚持使用您最满意的操作系统,或者对一大群(开发人员)来说最可用的操作系统,例如一组 Windows 上的 PC。
It is rare to need to do in-depth tuning on developmentplatform.
很少需要在开发平台上做深度调优。
You would reserve all those dtrace and other performance tuning to assembly platform (for example in Linux), for daily deployments where everything is recompiled and unit-tested.
您可以将所有这些 dtrace 和其他性能调整保留到汇编平台(例如在 Linux 中),用于重新编译和单元测试的日常部署。
And then you could set up a special JVM (like IBM JRockit instead of Sun JRE) to do some analysis on your integration platform, where all your system can be tested from front to back, with stress and non-regression test
然后你可以设置一个特殊的 JVM(比如 IBM JRockit 而不是 Sun JRE)来对你的集成平台做一些分析,你的所有系统都可以从前到后进行测试,压力和非回归测试
And finally, make all UAT (User Acceptance Tests) on a pre-production platform (which can be an expensive F15K or SunFire880 or V490 or...), with the target JRE used there.
最后,在预生产平台(可以是昂贵的 F15K 或 SunFire880 或 V490 或...)上进行所有 UAT(用户验收测试),并在那里使用目标 JRE。
My point is: there is so many parameters to take into account between development and release into production that switching OS at such an early stage may prove unnecessary.
我的观点是:在开发和发布到生产之间需要考虑太多参数,因此在如此早的阶段切换操作系统可能被证明是不必要的。
回答by Will Hartung
Develop on what you're happy with, and test on what you deploy on.
开发您满意的内容,并测试您部署的内容。
I get to develop Java on my Mac, and deploy on Solaris and Linux. The truth is that for the bulk of tasks, Java can be developed in an OS independent manner. This is especially true for server side development.
我开始在 Mac 上开发 Java,并在 Solaris 和 Linux 上进行部署。事实是,对于大部分任务,Java 可以以独立于操作系统的方式开发。对于服务器端开发尤其如此。
I like developing on a Unix in general over a Windows box, but that's me.
我一般喜欢在 Unix 上而不是 Windows 机器上进行开发,但这就是我。
回答by alastairs
Windows and Eclipse works well, as pmiller suggested. I can also recommend OS X with either Eclipse or IntelliJ IDEA (the latter also works on Windows, too).
正如 pmiller 建议的那样,Windows 和 Eclipse 运行良好。我还可以推荐带有 Eclipse 或 IntelliJ IDEA 的 OS X(后者也适用于 Windows)。
I've only ever done the most basic Java development on Solaris (basic data structures' programming practice at University), so I can't offer any real comparison, I'm afraid. I did find it quite painful on Solaris, though, due to a lack of proper tools (I think I was restricted to nedit or something).
我只在 Solaris 上做过最基本的 Java 开发(大学的基本数据结构编程实践),所以恐怕我无法提供任何真正的比较。但是,由于缺乏适当的工具(我认为我仅限于 nedit 或其他东西),我确实发现它在 Solaris 上非常痛苦。
回答by Egwor
Develop on whatever you like. As a java programmer you might want to avoid Mac OS X, primarily because new features seem to have been significantly delayed, and also because you can find you've no longer got a machine that supports the new versions of Java. Having said that I imagine developing on Mac OS X must be very nice (command line interface, dtrace, nice OS).
随心所欲地发展。作为 Java 程序员,您可能希望避免使用 Mac OS X,主要是因为新功能似乎已被显着延迟,还因为您会发现自己不再拥有支持 Java 新版本的机器。话虽如此,我想在 Mac OS X 上开发一定非常好(命令行界面、dtrace、漂亮的操作系统)。
I develop on windows with IntelliJ 7. It's ok, but needs some hefty hardware. I then deploy onto solaris/linux. Unless you're writing GUI's or integrating with C++ code, you should be fine choosing whatever takes your fancy.
我用 IntelliJ 7 在 Windows 上开发。没关系,但需要一些大的硬件。然后我部署到solaris/linux。除非您正在编写 GUI 或与 C++ 代码集成,否则您应该可以选择您喜欢的任何内容。
回答by Uri
One thing you have to take into account is whether you are going to be developing an application that could be run on a mac. I love OS X, but good old steve made sure that we're always many JDK versions behind. We just barely got Java 6. Developing on a mac may at least insure you are working under the lowest possible JDK version.
您必须考虑的一件事是您是否要开发可以在 mac 上运行的应用程序。我喜欢 OS X,但老史蒂夫确保我们总是落后很多 JDK 版本。我们刚刚获得 Java 6。在 mac 上开发至少可以确保您在尽可能低的 JDK 版本下工作。
回答by tunaranch
I'd say Mac OS X.
我会说 Mac OS X。
Java development built in. All the unix command line tools you want. Out of the box. Ant and maven are there. Not the latest versions, but that's easy enough to upgrade.
内置 Java 开发。您想要的所有 unix 命令行工具。盒子外面。Ant 和 maven 在那里。不是最新版本,但这很容易升级。
Yes, you might not have the very latest version of the JDK, but really, unless you have a need to develop for the latest and greatest JDK, it's not going to be an issue.
是的,您可能没有最新版本的 JDK,但实际上,除非您需要为最新最好的 JDK 进行开发,否则这不会成为问题。
回答by Szundi
Answer is easiear than you might think: use your favorite OS. For Java, it's the best answer. Not the development itself, but your comfort will help your success, browsing docs etc in your favorite environment.
答案比您想象的要容易:使用您最喜欢的操作系统。对于 Java,这是最好的答案。不是开发本身,而是您的舒适度将有助于您在您喜欢的环境中浏览文档等。