intellij idea failed to create JVM error code -1

omidXxX picture omidXxX · Aug 23, 2017 · Viewed 27.6k times · Source

I have intellij-idea installed. Although I have set JAVA_HOME environment variable referring to "C:\Program Files\Java\jdk1.8.0_45" but when I try to run it, I end up with the following error:

failed to create JVM: error code -1. JVM path: "C:\Program Files\JetBrains\IntelliJ IDEA 2017.2.2\jre64\" if you have a 64-bit jdk installed, define a JAVA_HOME variable in Computer> system variables> system settings> environment variables.

Windows 7_ 64-bit

Answer

Mohsen Alizadeh picture Mohsen Alizadeh · Nov 16, 2019

it is not a JAVA_HOME issue, you no doubt have touched the *.vmoptions files in bin folder. if you have entered the licence sever in the *.vmpotions file, notice that it should be like this "-javaagent:C:\Program Files....." don't forget to include "-javaagent:" at the beginning of the license server ;)