在 Linux 上运行 Java 有什么好处(远离 Windows)

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

What are benefits of running Java on Linux (moving away from Windows)

javawindowslinux

提问by Dan

I am currently running a large distributed Java system on Windows.

我目前正在 Windows 上运行一个大型分布式 Java 系统。

What are benefits of moving to Linux - from a Java point of view?

从 Java 的角度来看,迁移到 Linux 有什么好处?

One I can think of is being able to run 'services' natively. At the moment I have to log in to the Windows box and start the Java program.

我能想到的一个是能够在本地运行“服务”。目前我必须登录到 Windows 框并启动 Java 程序。

Are there performance gains, etc.?

是否有性能提升等?

采纳答案by Joachim Sauer

There are no major Java-specific advantages, the JVMs are pretty much the same.

没有特定于 Java 的主要优势,JVM 几乎相同。

You get the usual advantages of having a Unix-like operating system however. Many of those advantages boil down to familiarity or re-usability however, since Windows has slowly caught up with many of those:

但是,您可以获得类 Unix 操作系统的通常优势。然而,其中许多优势归结为熟悉或可重用性,因为 Windows 已经慢慢赶上了其中的许多优势:

  • easy, pretty standardized scripting: pretty much every unix-based OS has a POSIX compatible shell (Windows got the PowerShell, however)
  • easy, standardized, secure remote access (SSH)
  • ...
  • 简单、非常标准化的脚本:几乎每个基于 Unix 的操作系统都有一个 POSIX 兼容的 shell(但是 Windows 得到了 PowerShell)
  • 简单、标准化、安全的远程访问 (SSH)
  • ...

回答by jtahlborn

One potential benefit, the windows timer can be problematic (you can find many posts via google around this issue).

一个潜在的好处是,Windows 计时器可能会出现问题(您可以通过 google 找到许多关于此问题的帖子)。

One good resource here.

这里有一个很好的资源。

回答by Alain Pannetier

The bottom line is that both Linux and Java are server oriented so they collaborate IMO more gracefully.
It's no surprise that one of the major (and very profitable) server OS is Red Hat. It's reliable and datacenter friendly.

底线是 Linux 和 Java 都是面向服务器的,因此它们可以更优雅地协作 IMO。
Red Hat 是主要的(并且非常有利可图的)服务器操作系统之一也就不足为奇了。它可靠且数据中心友好。

Whereas Windows servers are still in the area of office automation, employees herding (Active Directory, SMS), and collaboration support (Sharepoint).

而 Windows 服务器仍处于办公自动化、员工聚集(Active Directory、SMS)和协作支持(Sharepoint)领域。

On the desktop, MS folks target the broader market of non IT people. Over the years they've managed to bury IT concepts and settings deeper and deeper. And this is counterproductive in the server area.

在台式机上,MS 人员的目标是更广泛的非 IT 人员市场。多年来,他们设法将 IT 概念和设置埋得越来越深。这在服务器领域适得其反。

By developing on Linux, you build the boat next to the pier. You won't have to work too much to carry the boat to the water... my 2 cts of course.

通过在 Linux 上开发,您可以在码头旁边建造船。你不需要工作太多就可以把船带到水里……当然是我的 2 克拉。