java 错误:拿起 java_options: -Djava.net.preferIPv4Stack=true
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/26576824/
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
Error: picked up java_options: -Djava.net.preferIPv4Stack=true
提问by Aaria
I get this error when doing anything in cmd involving Ionic and Android, e.g. Ionic build Android, or Ionic emulate Android etc... What does the error mean, is it important, and how do I fix it?
在 cmd 中执行任何涉及 Ionic 和 Android 的操作时出现此错误,例如 Ionic build Android,或 Ionic emulate Android 等...错误意味着什么,是否重要,我该如何解决?
回答by Prashant Gadekar
I'm pretty sure the _JAVA_OPTIONS variable is tucked in your environment settings, it is shown nowhere else. To remedy this,
我很确定 _JAVA_OPTIONS 变量隐藏在您的环境设置中,它在其他地方没有显示。为了解决这个问题,
- Press the Windows key and the Pause/Break key simultaneously
- A window should popup, click on "Advanced system settings"
- Click on "Environment Variables"
- Check System Variables.
- Delete the _JAVA_OPTIONS entry.
- 同时按下 Windows 键和暂停/中断键
- 应弹出一个窗口,单击“高级系统设置”
- 点击“环境变量”
- 检查系统变量。
- 删除 _JAVA_OPTIONS 条目。
回答by Karma Hunter
This "error" will happen if the variables JAVA_TOOL_OPTIONS or _JAVA_OPTIONS are set. I don't believe it is or should be of much concern to anything. As long as the application runs fine I see no real issue. So no, it is not very important, and seeing as the application was still built (and is likely working normally), I don't see a reason to try and correct it.'
如果设置了变量 JAVA_TOOL_OPTIONS 或 _JAVA_OPTIONS,就会发生这种“错误”。我不认为它是或不应该引起任何关注。只要应用程序运行良好,我就看不到真正的问题。所以不,这不是很重要,并且看到应用程序仍在构建(并且可能正常工作),我没有理由尝试纠正它。
Additionally if you do have errors within the application where this is the root cause, thismight be of some help.
此外,如果您在应用程序中确实有错误是根本原因,这可能会有所帮助。
Relevant/important post from the thread:
该线程中的相关/重要帖子:
A quick Google search indicates that this is output from the Java virtual machine upon realizing that certain environment variables, JAVA_TOOL_OPTIONS and JAVA_OPTIONS have been set.
http://www.nbl.fi/~nbl97/java/tuning/troubles/
These variables might be introduced in your Eclipse launch configuration. More likely, they may have been set in your workstation's environment by something you've recently installed.
On Windows XP, you can access the environment variables by right clicking on "My Computer", selecting "Properties", switch to the "Advanced" tab and click "Environment Variables". In that window, you should be able to see if the environment variable has been set up.
Alternatively, you can open a command prompt and type "SET" to see what environment variables have been set.
快速谷歌搜索表明这是在意识到某些环境变量 JAVA_TOOL_OPTIONS 和 JAVA_OPTIONS 已设置后从 Java 虚拟机输出的。
http://www.nbl.fi/~nbl97/java/tuning/troubles/
这些变量可能会在您的 Eclipse 启动配置中引入。更有可能的是,它们可能是由您最近安装的某些东西在您的工作站环境中设置的。
在 Windows XP 上,您可以通过右键单击“我的电脑”,选择“属性”,切换到“高级”选项卡并单击“环境变量”来访问环境变量。在该窗口中,您应该能够查看是否已设置环境变量。
或者,您可以打开命令提示符并键入“SET”以查看已设置的环境变量。