iStarsoft
检讨, 提示与技巧

无法创建 Java 虚拟机

240

有许多基于 Java 开发的计算机应用程序. 当用户运行这些应用程序时, they are supposed to run smoothly. 然而, in some instances, errors can pop up and terminate the launch of the respective software. This is usually happening by displaying the error message starts with无法创建 Java 虚拟机 …’. If you see this message, the next thing you would experience is that the Java program is stopped. 很好, have you ever experienced this error无法创建 Java 虚拟机 …’ 错误? 如果是这样, this article explains the fixes to it. 所以, 请继续阅读.

PS: learn more about how to fixstuck with 0x80070422 error code in Windows update‘, 和 ‘错误的系统配置信息窗口 10‘, 以及 ‘您的 windows 许可证将很快过期‘ 很容易.


What causes ‘could not create the Java virtual machine’ 错误?

There are several causes behind this issue. Mentioned below are some of those reasons.

  • If Java is invoked with the wrong arguments
    Or if you use unstable software (be it a game or any other app), this issue can occur.
  • If Java global maximum heap memory is not high enough
    This is among the most common causes for sure. 在这种情况下, you will have to allocate more memory to resolve the issue.
  • If Java executable file and application is not granted administrative privileges
    To solve this, you should provide administrative privileges.

How to fix ‘Could not create the Java virtual machine’ 错误?

As emphasized in the first paragraph of this article, we are going to explain how to fix this error. 事实上, there are multiple solutions to this error so you should pick the most appropriate one for you. Let’s read on.

修复 01: Configure a new system variable

Configuring a new system variable for Java is our fist solution to this error. ‘Could not create the Java virtual machineerror actually appear when there is not enough memory for it. 换句话说, Java requires a substantial amount of memory, and when there is not enough memory, it stops. 这就意味着, some of the machines that have larger memory capacity experience this issue rarer compared to other machines. Some of the users have found a solution to this issue simply by expanding the RAM allocated to Java. 很好, to allocate more memory to Java, you may try the following steps and get it done. We use this option as the first method because it is a very easy process.

  • 作为第一步, you should open the运行command in your computer. 要做到这一点, there are a couple of ways. You can hit Window key and ‘Rkey on the keyboard simultaneously to get运行dialog box opened. 如果不是, you can hit Windows key and type运行in the search box and select the ‘Run’ 选项.
  • No matter which method you select, 只是去 ‘运行.’ 一旦 ‘运行‘ 对话框已打开, you will see a search bar as well. In this search bar, enter the textsysdm.cpl‘. 然后, press the button labeled还行.’ You will now see a different window. This Window will comprise the title系统属性.’

  • On this Window called系统属性,’ you should select the tap labeled先进的‘ 选项卡. 在此选项下, you will find a button calledEnvironment Variables.’ This will lead you to another window.

  • 点击标记的选项 ‘新增功能which is located underSystem variables.’
  • 现在, you should enter_JAVA_OPTIONS.’ This should be entered inside the Variable name text box.

  • 在那之后, you should enter_Xmx512Mwithin the Variable value text box. 很好, this option will increase RAM allocation by 512 兆 字节.

  • 现在, 完成此过程, 你应该点击 ‘还行‘ 按钮.
  • 此后, 您可以按 ‘还行button on theEnvironmental Windows‘ 以及.
  • ’ S 它, and 512MB RAM will be allocated.

- 广告 -

修复 02: Make ‘Runas an Administrator Option for Java

If the previous option doesn’t work for you, you will have to try a different option. 如果它不 ’ t 工作, 这意味着, the error might be something else. 事实上, ‘Could not create the Java virtual machine …can occur due to insufficient admin rights to Java. 如果您使用的是 windows 10, you can fix the issue using the following steps.

  • 在窗口中 10, you should open Cortana. 要做到这一点, you should hit Windows Key withQkey on the keyboard.
  • 现在, you will see a search box appearing. In this box, 输入 ‘Java.’
  • 然后, 你将能够看到 ‘Java‘ 选项. Right-click on this option and then select the option calledOpen File Location.’

  • This option will open the folder of Java in the File Explorer window.
  • You can now go to the java.exe file and then right-click on it. You will then be able to select the属性‘ 选项.

  • You can then select the tab labeled兼容性.’

  • After selecting the兼容性‘ 选项, 您应该选择 ‘Run this program as an administrator.
  • To complete the process, 您应该选择名为 ‘应用.’
  • 单击 ‘还行so you can finish the process.

修复 03: Install Java once again

If none of the above options have worked so far, the cause of the issue might be something different. 所以, as another remedy, you should try to reinstall Java and check if it resolved the issue. After reinstalling Java, you can expectCould not create the Java virtual machineerror to be gone.

所以, to get it done, you should first uninstall the existing version of Java. 为那, you must go to control panel of the machine. To access the control panel, there are several options you can consider. 举个例子, you can either choose a long way or a shortcut. 我们相信, entering the textappwiz.cpl.’ 内 ‘运行box is the most convenient way.

  • 然后, 在搜索框中, you should enterJava.’ 如果不是, you can simply scroll down until you find the option calledJava.’
  • 现在, select the option labeledJava‘ 然后点击 ‘卸载.’
  • You may now click on是啊on the confirmation box which will popup.
  • 现在, restart Windows computer after the installation.
  • Open a web browser of your preference and go to the Java download page.

  • Make sure you choose the appropriate software version for the operating system running on your computer. 举个例子, if you have 32-bit Windows OS, you should choose the 32-bit Java file. 然而, if the operating system runs on 64-bit, you should choose the 64-bit version accordingly. If you are doubtful about the version, you may try installing both of the Java files. 要做到这一点, you should go to the Windows Offline file.
  • No matter whether you have selected 32-bit version64-bit version, you must open Java setup wizard now.
  • 点击标记的选项 ‘安装which appears as a button on this setup wizard you have just launched.


很好, that is exactly how to fixCould not create the Java virtual machine ….’ 问题. This is also known as Java Virtual Machine fatal error. 我们相信, the resolutions we have mentioned above can address this issue for good. Once the issue is fixed, you will be able to run the required Java software without any issue.
If you need to learn more about How to Launch The Application Blocked by Java Security, 这只是给你的.
您可能还喜欢

注释已关闭.

本网站使用 cookie 来改善您的体验. 我们假设你对此没问题, 但如果你愿意, 你可以选择退出. 接受了解更多