Fix: Could not create the Java Virtual Machine. A fatal exception has occurred. Program will exit.
Open CMD
Check java version
java –version
If get error, search Environment Variables
Edit the system environment variables > Advance > Environment Variables
Double click path within
Click on New and add your java bin path
In my case the is C:\Program Files\Java\jdk-19\bin
Could not create Java virtual machine error on Windows 10 and windows 11
Variable name: _JAVA_OPTIONS
Variable value: -Xmx512M