Solved: Error Occurred During Initialization of VM

Solved: Error Occurred During Initialization of VM
VM 초기화 중 발생한 오류 해결 방법

The error occurred during initialization of VM is a classic Java issue when you are trying to run VM. The error message can appear on any system you try to launch a virtual machine, including Windows, Mac, or Linux.

Here are some of the error instances found by our Windows Report software experts:

  • Error occurred during initialization of VM noclassdeffounderror java/lang/object.
  • Error occurred during initialization of VM Minecraft server – The Minecraft server could not reserve enough memory to run.
  • Error occurred during initialization of VM Could not reserve enough space for object heap

How do I fix error occurred during initialization of VM?

This issue occurs because the JVM allocates a big chunk of initial heap memory from the system that Windows or other OSes can’t provide. So, even if you have 8GB of RAM, if it’s already in use and the heap size is too big, you will see the error during the initialization of VM.

Restart your PC and try to run Java before the other programs initialize, and make sure you’re running a 64-bit JVM. The 32-bit version can’t use more than 1.5 Gb of RAM.

1. Change the Java heap size using Command Prompt

  1. Click the Start button, type cmd, and click on Run as administrator from the results.
  2. Type or paste the following command and press Enter : java -Xms256m -Xmx512M

This command will set the Java Xms initial heap memory to a lower value, and now you can initialize VM without any issues.

From our tests in the WR labs, this solution worked in all situations to fix the VM initialization error. However, you can also apply the solutions below for the same effect.

2. Change the variables in the batch file

  1. Press the Win + E shortcut to start File Explorer.
  2. Locate and edit the .bat file of the server you want to run.
  3. Now, change the Xms and Xmx values in the file with lower ones. For instance, -Xms256M -Xmx512M. You can go even higher, depending on the actual RAM you have.

If you go too high with the virtual memory values, Java will display a Could not reserve enough space for object heap error.

This simple solution will work on the Could not reserve enough space for 2097152kb object heap error. But for this one, you should check if you’re using a 32-bit JVM. As we’ve mentioned above, the 32bit version will not handle the 2 Gb memory it’s trying to allocate.

3. Run a Bash command

  1. Log into another session of your server and go to Bash to run a Java command.
  2. Type or paste the following command and press Enter: -bash – 3.3$ export _JAVA_OPTIONS = " – Xmx256M"
  3. To make sure, run the following command to see if you have changed the Java setting: -bash – 3.3$ javac HelloWorldApp.java
  4. If you get the message Picked up _JAVA_OPTIONS: – Xmx256M, you are fine.

VM 초기화 중에 계속 오류가 발생하는 경우 백그라운드에서 실행 중인 일부 앱을 닫은 후 다시 시도해 보세요. VM을 실행하기에는 물리적 메모리가 너무 부족할 수도 있습니다.

당신이 직면할 수 있는 또 다른 서버 문제는 Minecraft의 Io.Netty.Channel.Abstractchannel이지만 이 가이드가 도움이 될 것입니다.

가이드를 요약하면 VM 초기화 중에 발생한 오류는 실제로 Java가 초기 힙 메모리를 너무 많이 할당하는 문제이며 WR 랩 테스트에서 값을 낮게 설정하면 문제가 빠르게 해결됩니다.

명령 프롬프트 명령을 실행하거나 배치 파일을 편집하거나 Bash 명령을 실행하여 이를 수행할 수 있습니다.

Minecraft에서 인터넷 연결 오류가 발생하는 경우 강조 표시된 가이드를 눌러 문제를 빠르게 해결하세요.

다른 제안 사항이나 테스트된 솔루션이 필요하면 아래 의견 섹션으로 이동하여 메모를 남겨주세요.

답글 남기기

이메일 주소는 공개되지 않습니다. 필수 필드는 *로 표시됩니다