无法识别的选项:-XLoggc:

时间:2012-10-28 09:25:22

标签: java garbage-collection openjdk

OpenJDK不支持-XLoggc标志吗?我可以使用哪些等效标志? OpenJDK的标志记录在哪里?

$ cat Hello.java
public class Hello {
        public static void main(String[] args) {
                System.out.println("Hello World");
        }
}
$ javac Hello.java
$ java -XLoggc:gc.log Hello
Unrecognized option: -XLoggc:gc.log
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
$ java -version
java version "1.7.0_147-icedtea"
OpenJDK Runtime Environment (IcedTea7 2.0pre) (7~b147-2.0~pre6-1ubuntu1)
OpenJDK Client VM (build 21.0-b17, mixed mode, sharing)

1 个答案:

答案 0 :(得分:3)

标志为-Xloggc,小写“l”。