Project Zomboid

Project Zomboid

Thyateira Dec 19, 2021 @ 12:27pm
Could not create the Java Virtual Machine
My game wasn't launching. So I have run the bat file. It says:
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

Any help appreciated. Thanks in advance !
Note: b41 mutliplayer lastest beta
Last edited by Thyateira; Dec 19, 2021 @ 12:30pm
< >
Showing 1-15 of 24 comments
Beard Dec 19, 2021 @ 1:48pm 
Can you share the whole error log? Either a screenshot or copy all the text that is shown there?
Thyateira Dec 19, 2021 @ 4:02pm 
Originally posted by Beard:
Can you share the whole error log? Either a screenshot or copy all the text that is shown there?

You may see the text below.

D:\SteamLibrary\steamapps\common\ProjectZomboid>SET _JAVA_OPTIONS=

D:\SteamLibrary\steamapps\common\ProjectZomboid>SET PZ_CLASSPATH=istack-commons-runtime.jar;jassimp.jar;javacord-2.0.17-shaded.jar;javax.activation-api.jar;jaxb-api.jar;jaxb-runtime.jar;lwjgl.jar;lwjgl-natives-windows.jar;lwjgl-glfw.jar;lwjgl-glfw-natives-windows.jar;lwjgl-jemalloc.jar;lwjgl-jemalloc-natives-windows.jar;lwjgl-opengl.jar;lwjgl-opengl-natives-windows.jar;lwjgl_util.jar;sqlite-jdbc-3.27.2.1.jar;trove-3.0.3.jar;uncommons-maths-1.2.3.jar;./

D:\SteamLibrary\steamapps\common\ProjectZomboid>".\jre64\bin\java.exe" -Djava.awt.headless=true -Dzomboid.steam=1 -Dzomboid.znetlog=1 -XX:-CreateCoredumpOnCrash -XX:-OmitStackTraceInFastThrow -XX:+UseZGC -Xms1800m -Xmx2048m -Djava.library.path=./win64/;./ -cp istack-commons-runtime.jar;jassimp.jar;javacord-2.0.17-shaded.jar;javax.activation-api.jar;jaxb-api.jar;jaxb-runtime.jar;lwjgl.jar;lwjgl-natives-windows.jar;lwjgl-glfw.jar;lwjgl-glfw-natives-windows.jar;lwjgl-jemalloc.jar;lwjgl-jemalloc-natives-windows.jar;lwjgl-opengl.jar;lwjgl-opengl-natives-windows.jar;lwjgl_util.jar;sqlite-jdbc-3.27.2.1.jar;trove-3.0.3.jar;uncommons-maths-1.2.3.jar;./ zombie.gameStates.MainScreenState
<JAVA_HOME>/lib/ext exists, extensions mechanism no longer supported; Use -classpath instead.
.Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

D:\SteamLibrary\steamapps\common\ProjectZomboid>PAUSE
Press any key to continue . . .
Last edited by Thyateira; Dec 19, 2021 @ 4:03pm
Thyateira Dec 19, 2021 @ 4:10pm 
In case of text not clear this is my screenshot:
https://steamcommunity.com/sharedfiles/filedetails/?id=2687642570
Beard Dec 20, 2021 @ 6:25am 
Can you try verifying your game files:
Steam Library > Right click Project Zomboid > Properties > Local Files > Verify Local Files
If that doesnt help, can you try launching with the 32.bat file?
Thyateira Dec 20, 2021 @ 10:42am 
Hi again,
Unfortunately did not work out..
Beard Dec 20, 2021 @ 11:09am 
What kind of error shows up with the 32.bat?
Thyateira Dec 20, 2021 @ 11:26am 
Originally posted by Beard:
What kind of error shows up with the 32.bat?
As same as the previous one
Beard Dec 20, 2021 @ 11:33am 
In that case can you share the "hs_err_pid" file found in D:\SteamLibrary\steamapps\common\ProjectZomboid?
You can upload it to pastebin.com for example. And can you tell us your system specifications?
Sud0 Dec 20, 2021 @ 8:36pm 
Same issue here.
Thyateira Dec 21, 2021 @ 10:03am 
Unfortunately I couldn't find the file you required. Here is my specifications:

CPU: AMD Ryzen 7 3750H 2.3Ghz
RAM: 16 GB
OS: Windows 10 Home Single Language
Graphic Card: GTX 1650 4GB
Last edited by Thyateira; Dec 21, 2021 @ 10:39am
Beard Dec 22, 2021 @ 12:45am 
Those specifications should be more than fine. The log unfortunately doesnt tell us much as to why the game doesnt launch or why Java cannot be created.
Can you try editing the ProjectZomboid64.bat file with a text editor?
Change the line -XX:+UseZGC to -XX:+UseG1GC
Then save and try launching the game through that file to see if that helps.
Scott Mac Dec 22, 2021 @ 1:11am 
Same issues. Scoured the forums and previous 'did not launch' threads. Tried running the .bat files and got the fatal exception error as above.
Have previously had it installed and running (ages ago - thought I'd try again when I saw the latest update announcement!)
Have just done a java update tonight. Updated graphics drivers not long ago and they are still current.

console.txt pastebin is here: https://pastebin.com/27qKyZp3

Trying a full reinstall next.
Beard Dec 22, 2021 @ 6:44am 
3
If the reinstall doesn't work, try going to Steam\steamapps\common\ProjectZomboid
There, delete the "jre" and "jre64" folders, after that verify your game files and start the game again.
Steam Library > Right click Project Zomboid > Properties > Local Files > Verify Local Files

This would make sure that it reinstalls the built in Java, sometimes a Steam reinstall doesnt uninstall some leftover files which can cause issues.
Thyateira Dec 22, 2021 @ 9:43am 
Originally posted by Beard:
If the reinstall doesn't work, try going to Steam\steamapps\common\ProjectZomboid
There, delete the "jre" and "jre64" folders, after that verify your game files and start the game again.
Steam Library > Right click Project Zomboid > Properties > Local Files > Verify Local Files

This would make sure that it reinstalls the built in Java, sometimes a Steam reinstall doesnt uninstall some leftover files which can cause issues.

Thanks for your effort. It worked for me :steamhappy:
Sud0 Dec 22, 2021 @ 7:29pm 
deleting the jre and jre64 folders worked. It must not be properly updating the JRE install.
< >
Showing 1-15 of 24 comments
Per page: 1530 50

Date Posted: Dec 19, 2021 @ 12:27pm
Posts: 24