简体   繁体   English

在java7 JRE中是否忽略了-client和-server命令行选项?

[英]Are the -client and -server command line options ignored in java7 JRE?

I've installed java7 jre: java -version 我已经安装了java7 jre:java -version

java version "1.7.0_02" java版“1.7.0_02”

Java(TM) SE Runtime Environment (build 1.7.0_02-b13) Java(TM)SE运行时环境(版本1.7.0_02-b13)

Java HotSpot(TM) 64-Bit Server VM (build 22.0-b10, mixed mode) Java HotSpot(TM)64位服务器VM(内置22.0-b10,混合模式)

I want to test if the -server option works in the JRE. 我想测试-server选项是否在JRE中有效。 That seems to be the default on my machine. 这似乎是我机器上的默认设置。 I also want to check if both the -server and the -client options are supported. 我还想检查是否支持-server和-client选项。 So I wrote the following program: 所以我写了以下程序:

public class Info {
    public static void main(String... args) {
        System.out.println(System.getProperty("java.vm.name"));
        System.out.println(System.getProperty("java.vm.version"));
        System.out.println(System.getProperty("java.vm.info"));
    }
}

If I issue the command java -client -cp e:\\temp Info from the jre7\\bin installation folder the program prints: 如果我从jre7 \\ bin安装文件夹发出命令java -client -cp e:\\ temp Info,程序将打印:

Java HotSpot(TM) 64-Bit Server VM Java HotSpot(TM)64位服务器VM

22.0-b10 22.0-B10

mixed mode 混合模式

It prints the same for -server. 它为-server打印相同的内容。

Are -client and -server ignored in the java7 jre? 在java7 jre中是否忽略了-client和-server? Is there online documentation about this behavior? 是否有关于此行为的在线文档?

PS I know that there is now tiered compilation. PS我知道现在有分层编译。

This is documented in the Java command page . 这在Java命令页面中有记录 With the 64-bit version of Java 7, only server mode is implemented. 使用64位版本的Java 7,仅实现了服务器模式。 The -client option is quietly ignored. -client选项被静静地忽略。 (Note that the manual says that this may change in future versions.) (请注意,手册中说这可能会在将来的版本中发生变化。)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM