Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

intellij idea failed to create JVM error code -1

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

like image 826
omidXxX Avatar asked Aug 23 '17 18:08

omidXxX


3 Answers

Note that there are 2 .vmoptions files. There is the one in the bin directory and an override in %HOMEPATH%\IntelliJIdea\config

For me the answer was to remove -Xmx and -Xms options from the override file.

like image 171
GMauro Avatar answered Nov 12 '22 01:11

GMauro


My workaround was to go to C:\Users\{username}\AppData\Roaming\JetBrains\IntelliJIdea2020.3\idea64.exe vmoptions file and delete the whole content. The error disappeared and IntelliJ started normally.

like image 10
theomeli Avatar answered Nov 12 '22 00:11

theomeli


Please check your phpstorm64.exe.vmoptions file located at bin folder and remove option

-XX:+UseG1GC

like image 6
joseantgv Avatar answered Nov 12 '22 00:11

joseantgv