jvm.cfg 中的 Java 警告

jvm.cfg 中的 Java 警告

您好,我在 kubuntu 11.10 上安装 Java 后收到警告。Java 程序运行,但我总是收到 4 个警告:

$ java
Warning: no leading - on line 1 of `/usr/lib/jvm/java-6-sun-1.6.0.26/jre/lib/amd64/jvm.cfg'
Warning: missing VM type on line 1 of `/usr/lib/jvm/java-6-sun-1.6.0.26/jre/lib/amd64/jvm.cfg'
Warning: no leading - on line 1 of `/usr/lib/jvm/java-6-sun-1.6.0.26/jre/lib/amd64/jvm.cfg'
Warning: missing VM type on line 1 of `/usr/lib/jvm/java-6-sun-1.6.0.26/jre/lib/amd64/jvm.cfg'

我错过了什么?提前致谢!文件 /usr/lib/jvm/java-6-sun-1.6.0.26/jre/lib/amd64/jvm.cfg 的内容是:

/usr/lib/jvm/java-6-sun
#
# %W% %E%
#
# Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
# ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
#
# 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.
#
# You may also select a JVM in an arbitrary location with the
# "-XXaltjvm=<jvm_dir>" option, but that too is unsupported
# and may not be available in a future release.
#
-server KNOWN
-client IGNORE
-hotspot ERROR
-classic WARN
-native ERROR
-green ERROR

答案1

似乎当前的 jvm.cfg 无效,并且/usr/lib/jvm/java-6-sun不应该出现在第一行。

注释掉此行(在前面添加#)并尝试查看是否仍然出现错误/警告。

相关内容