Java Virtual Machine Launcher 无法创建虚拟机错误如何解决?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/18459945/
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
How to solve could not create the virtual machine error of Java Virtual Machine Launcher?
提问by Dnyani
I am working on java wicket framework and Apache tomcat. Here I have Problem when i tried
to start tomcat it shows Java Virtual Machine Launcher pop window "Could not create the
Java Virtual Machine".
After clicking on "OK" button on Pop window it shows the error on console.
我正在研究 java wicket 框架和 Apache tomcat。在这里,当我尝试
启动 tomcat时遇到问题,它显示 Java 虚拟机启动器弹出窗口“无法创建
Java 虚拟机”。
单击弹出窗口上的“确定”按钮后,它会在控制台上显示错误。
Error occurred during initialization of VM.
Could not reserve enough space for object heap.
虚拟机初始化过程中发生错误。
无法为对象堆保留足够的空间。
Please give me any reference or suggestions.
Thanks in Advance.
请给我任何参考或建议。
提前致谢。
回答by Scary Wombat
Edit your Catlina.bat so that your -Xmx settings are less than your physical memory
编辑您的 Catlina.bat,使您的 -Xmx 设置小于您的物理内存
回答by Scary Wombat
May be this can help you- Add the system variable _JAVA_OPTIONS and in the "new variable value" add "-Xmx1024M" Xmx sets the maximum heap memory size
可能这可以帮助您 - 添加系统变量 _JAVA_OPTIONS 并在“新变量值”中添加“-Xmx1024M” Xmx 设置最大堆内存大小
回答by procrazium
The error does not say much and lot of things can be wrong. One thing that was wrong in my case was following
错误并没有说明太多,很多事情都可能是错误的。在我的案例中错误的一件事是跟随
-x.DargName=108352123
Which is clearly wrong and should have been
这显然是错误的,应该是
-Dx.argName=108352123
回答by KARTHIKEYAN.A
Error:
错误:
sony@sony-VPCEH25EN:~$ java --version
Picked up JAVA_TOOL_OPTIONS: -javaagent:/usr/share/java/jayatanaag.jar
Unrecognized option: --version
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
Solution:Remove extra hyphen '-'
解决方案:删除多余的连字符“-”
sony@sony-VPCEH25EN:~$ java -version
Picked up JAVA_TOOL_OPTIONS: -javaagent:/usr/share/java/jayatanaag.jar
java version "1.8.0_101"
Java(TM) SE Runtime Environment (build 1.8.0_101-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.101-b13, mixed mode)
回答by Neelam Prajapati
- Tap on Windows-Pause to open the System Control Panel applet. You can alternatively open the control panel manual to go there if you prefer it that way. Click on advanced system settings on the left.
- Select environmental variables here.
- Click on new under System Variables.
- Enter '_JAVA_OPTIONS' as the variable name.
- Enter '-Xmx1024M' as the variable value.
- Click ok twice.
- 点击 Windows-Pause 打开系统控制面板小程序。如果您愿意,也可以打开控制面板手册去那里。单击左侧的高级系统设置。
- 在这里选择环境变量。
- 单击系统变量下的新建。
- 输入“_JAVA_OPTIONS”作为变量名。
- 输入“-Xmx1024M”作为变量值。
- 单击确定两次。
回答by Karthic.K
If none of the other options works, then this could be an issue with the version of the JDK itself, just uninstall the current jdk and install the latest version.
如果其他选项都不起作用,那么这可能是 JDK 本身版本的问题,只需卸载当前的 jdk 并安装最新版本。
I too faced this issue, after trying everything I upgraded to latest JDK, then this issue was resolved finally.
我也遇到了这个问题,在尝试了所有升级到最新的 JDK 之后,这个问题终于得到了解决。
回答by Prashant Sahoo
I was facing the same issue while i was using JDK 1.8.0_0564 bit and eclipse-jee-oxygen-3a-win32-x86_64on Windows 64bit Operating System.
我在Windows 64位操作系统上使用JDK 1.8.0_0564 位和eclipse-jee-oxygen-3a-win32-x86_64时遇到了同样的问题。
Finally i resolved the issue by changing JDKversion jdk1.8.0_05to jdk1.8.0_172
最后我通过将JDK版本jdk1.8.0_05更改为jdk1.8.0_172解决了这个问题
回答by ghanshyam singh
I was facing the same issue while i was using "jdk-10.0.1_windows-x64_bin" and eclipse-jee-oxygen-3a-win32-x86_64 on Windows 64 bit Operating System.
我在 Windows 64 位操作系统上使用“jdk-10.0.1_windows-x64_bin”和 eclipse-jee-oxygen-3a-win32-x86_64 时遇到了同样的问题。
But Finally i resolved this issue by changing my jdk to "jdk-8u172-windows-x64", Now its working fine. @Thanks
但最后我通过将我的 jdk 更改为“jdk-8u172-windows-x64”解决了这个问题,现在它工作正常。@谢谢
回答by RajieRoo
I was facing the same issue, I was using tomcat 8.5with Java 10.Finally I installed Java 8(1.8.0_171)and it's working fine without any issues
我遇到了同样的问题,我在Java 10 中使用了 tomcat 8.5。最后我安装了 Java 8(1.8.0_171)并且它工作正常,没有任何问题
回答by Snehal Masne
For me it was picking the default JVM v6 set in env vars.
对我来说,它选择了在 env vars 中设置的默认 JVM v6。
Needed to explicitly add below in eclipse.ini to use v8 which is req by photon.
需要在 eclipse.ini 中明确添加以下内容以使用光子要求的 v8。
-vm
C:\Program Files\Java\jdk1.8.0_75\bin\javaw.exe
--launcher.appendVmargs
-vmargs
-Dosgi.requiredJavaVersion=1.8
NOTE : Add the entry of vm above the vm args else it will not work!
注意:在 vm args 上方添加 vm 条目,否则它将不起作用!