Java -server 参数

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

Java -server argument

javaargumentscommand-line-argumentsjvm-arguments

提问by Savvas Dalkitsis

Possible Duplicate:
Real differences between “java -server” and “java -client”?

可能的重复:
“java -server”和“java -client”之间的真正区别?

I've seen the argument "-server" used as a command line argument for java.exe:

我已经看到参数“-server”用作 java.exe 的命令行参数:

java.exe -server MyClass

java.exe -server MyClass

but no matter how hard I searched the internet I found no documentation as to what exactly it does. Can anyone explain?

但无论我多么努力地在互联网上搜索,我都没有找到关于它究竟做了什么的文件。谁能解释一下?

回答by Chris Dennett

-server

Select the Java HotSpot Server VM. On a 64-bit capable jdk only the Java HotSpot Server VM is supported so the -server option is implicit. This is subject to change in a future release.

-服务器

选择 Java HotSpot 服务器虚拟机。在支持 64 位的 jdk 上,仅支持 Java HotSpot 服务器 VM,因此 -server 选项是隐式的。这在未来的版本中可能会发生变化。

Basically, the server VM does stuff in a different way to the client VM. It has different styles of garbage collection, and it may take longer to load up but generally has higher throughput.

基本上,服务器 VM 以与客户端 VM 不同的方式执行操作。它有不同风格的垃圾收集,加载可能需要更长的时间,但通常具有更高的吞吐量。