问题描述
它有一些奇怪的关键字.请说明文件的一般用途.
It has some strange keywords. Please explain the general purpose of the file.
推荐答案
简短版本:
控制在调用 java 或 javac 时可以使用启动标志选择的 JVM.
Short version:
Controls the JVMs which may be picked with startup flags when invoking java or javac.
让我们从评论开始
# List of JVMs that can be used as an option to java, javac, etc.
# Order is important -- first in this list is the default JVM.
# NOTE that this both this file and its format are UNSUPPORTED and
# WILL GO AWAY in a future release.
所以我们有一个JVM"列表要传递给 java/javac.我们需要在这个文件的上下文中阐明 JVM 是什么.
So we have a list of 'JVM's to pass to java/javac. We need to clarify what a JVM is in the context of this file.
让我们看一个简单的线条:
Let's take one simple line:
-green ERROR
和实验
java -green > /dev/null
Error: green VM not supported
因此 ERROR 标志似乎表示不支持的配置.
So it seems that the ERROR flag signals an unsupported configuration.
让我们继续
-classic WARN
并执行
java -classic > /dev/null
Warning: classic VM not supported; client VM will be used
似乎WARN"会将我们发送到默认的 JVM,这对我们来说似乎是客户端".
Seems that 'WARN' will send us to the default JVM which seems to be 'client' for us.
那我们可以看看第一行
-client IF_SERVER_CLASS -server
这似乎表明默认是服务器除非机器是服务器类.
which seems to signal that the default is server unless the machine is a server-class.
下一个是
-server KNOWN
这意味着服务器 JVM 是已知的.
which means that the server JVM is known.
最后
-hotspot ALIASED_TO -client
表示热点相当于客户端.
means that hotspot is equivalent to client.
这篇关于与 Java 相关的 jvm.cfg 文件的目的是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!