jvm.cfg文件与Java相关的目的是什么? [英] What is the purpose of jvm.cfg file in relation to Java?

查看:1075
本文介绍了jvm.cfg文件与Java相关的目的是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

它有一些奇怪的关键字。

解决方案

短版本:





长版本:



控制可以在调用java或javac时使用启动标志选择的JVM。 >让我们从注释开始

 #可以用作java,javac等选项的JVM列表
#顺序很重要 - 这个列表中的第一个是默认的JVM。
#注意,这个文件和它的格式是UNSUPPORTED和
#WILL GO AWAY在未来的版本。

所以我们有一个'JVM'传递给java / javac的列表。我们需要澄清在这个文件的上下文中JVM是什么。



让我们看一个简单的行:

  -green错误

和实验

  java -green> / dev / null 
错误:绿色虚拟机不支持

表示不支持的配置。



让我们继续到

  -classic WARN 

并执行

  java -classic> / dev / null 
警告:不支持经典VM;客户端VM将被使用

似乎WARN会将我们发送到默认的JVM

 

code> -client IF_SERVER_CLASS -server

这似乎表示默认是服务器



下一个是

  -server KNOWN 

这意味着服务器JVM是已知的。 p>

最后

  -hotspot ALIASED_TO -client 

表示热点等同于客户端。


It has some strange keywords. Please explain the general purpose of the file.

解决方案

Short version:

Controls the JVMs which may be picked with startup flags when invoking java or javac.

Long version:

Let's start with the comments

# 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.

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

and experiment

java -green > /dev/null
Error: green VM not supported

So it seems that the ERROR flag signals an unsupported configuration.

Let's move on to

-classic WARN

and execute

java -classic > /dev/null
Warning: classic VM not supported; client VM will be used

Seems that 'WARN' will send us to the default JVM which seems to be 'client' for us.

Then we can take a look at the first line

-client IF_SERVER_CLASS -server

which seems to signal that the default is server unless the machine is a server-class.

The next one is

-server KNOWN

which means that the server JVM is known.

And finally

-hotspot ALIASED_TO -client

means that hotspot is equivalent to client.

这篇关于jvm.cfg文件与Java相关的目的是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆