Java 程序打印出“JAVA_OPTIONS”

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/20358268/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-13 01:20:04  来源:igfitidea点击:

Java program prints out "JAVA_OPTIONS"

java

提问by user3062593

I am starting to learn Java. After I run my code, I get some additional lines along with the expected output. Can someone please tell me what they mean?

我开始学习Java。运行我的代码后,我会得到一些额外的行以及预期的输出。有人可以告诉我他们是什么意思吗?

My Code:

我的代码:

public class HelloWorld
{
    public static void main(String[] args)
    {
        System.out.println("Hello World!!!");
    }
}

Output:

输出:

Picked up JAVA_TOOL_OPTIONS: -agentlib:jvmhook
Picked up _JAVA_OPTIONS: -Xrunjvmhook -Xbootclasspath/a:C:\PROGRA~2\HP\QUICKT~1\bin\JAVA_S~1\classes;C:\PROGRA~2\HP\QUICKT~1\bin\JAVA_S~1\classes\jasmine.jar
Hello World!!!

Thanks for your help!

谢谢你的帮助!

回答by dcsohl

That will happen if the environment variables JAVA_TOOL_OPTIONSor _JAVA_OPTIONSare set. If you don't need them I suggest not setting them. If you are running it in Eclipse then I'd look into the "Run Configuration" or Eclipse's configuration. There is, per this SO question, no way of suppressing these messages if these variables are set, apparently.

如果设置了环境变量JAVA_TOOL_OPTIONS_JAVA_OPTIONS设置,就会发生这种情况。如果你不需要它们,我建议不要设置它们。如果您在 Eclipse 中运行它,那么我会查看“运行配置”或 Eclipse 的配置。显然,根据this SO question,如果设置了这些变量,则无法抑制这些消息。