javaminecraft

Java refuses to launch minecraft


Whenever I try to launch Minecraft, I get these errors:

Warning: No leading - on line 1 of B:\Minecraft\runtime\jre-x64\1.8.0-51\amd64\jvm.cfg
Warning: Missing VM type on line 1 of B:\Minecraft\runtime\jre-x64\1.8.0-51\amd64\jvm.cfg
Warning: No leading - on line 2 of B:\Minecraft\runtime\jre-x64\1.8.0-51\amd64\jvm.cfg
Warning: Missing VM type on line 2 of B:\Minecraft\runtime\jre-x64\1.8.0-51\amd64\jvm.cfg
Warning: No leading - on line 3 of B:\Minecraft\runtime\jre-x64\1.8.0-51\amd64\jvm.cfg
Warning: Missing VM type on line 3 of B:\Minecraft\runtime\jre-x64\1.8.0-51\amd64\jvm.cfg
Error: No known VMs. (Check for corrupt jvm.cfg file)

And when I look at the file in question, it it blank.


Solution

    1. Check that your java home and java environment variables are pointing to the right version.
    2. Open jvm.cfg file and specify correct path to java.home.

    You are hitting the error because your jvm.cfg file is blank. Take a look at this question for what jvm.cfg is: What is the purpose of jvm.cfg file in relation to Java?