Abhishek Abhishek - 3 months ago 143
Java Question

JDK 1.8 not working with IntelliJ IDEA 15.0.2 "Error: Abnormal build process termination"

I know I am probably the nth person asking this question, but I have been trying to hunt down a solution for this by looking at other answers for the past couple of days but I am still stuck.

Whenever I try to use JDK 1.8 with IntelliJ IDEA 15.0.2, I get the following error when I try to run my program:

Error: Abnormal build process termination:
Error occurred during initialization of VM
Could not reserve enough space for 716800KB object heap


I have tried to change the vmoptions, but I still do not have any luck with this. Here are the values I currently have for my vmoptions:

idea.exe.vmoptions



-server
-Xms512m
-Xmx1028m
-XX:MaxPermSize=1028m
-XX:ReservedCodeCacheSize=240m
-XX:+UseConcMarkSweepGC
-XX:SoftRefLRUPolicyMSPerMB=50
-ea
-Dsun.io.useCanonCaches=false
-Djava.net.preferIPv4Stack=true
-XX:+HeapDumpOnOutOfMemoryError
-XX:-OmitStackTraceInFastThrow





idea64.exe.vmoptions



-Xms1028m
-Xmx2048m
-XX:MaxPermSize=1028m -Xmx2048m
-XX:ReservedCodeCacheSize=1028m
-XX:+UseConcMarkSweepGC
-XX:SoftRefLRUPolicyMSPerMB=50
-ea
-Dsun.io.useCanonCaches=false
-Djava.net.preferIPv4Stack=true
-XX:+HeapDumpOnOutOfMemoryError
-XX:-OmitStackTraceInFastThrow


Any solutions to resolve this?

Answer

Came to a solution by changing the vm options to the following:

idea.exe.vmoptions

-server
-Xms128m
-Xmx512m
-XX:MaxPermSize=250m
-XX:ReservedCodeCacheSize=240m
-XX:+UseConcMarkSweepGC
-XX:SoftRefLRUPolicyMSPerMB=50
-ea
-Dsun.io.useCanonCaches=false
-Djava.net.preferIPv4Stack=true
-XX:+HeapDumpOnOutOfMemoryError
-XX:-OmitStackTraceInFastThrow

idea64.exe.vmoptions

-Xms128m
-Xmx750m
-XX:MaxPermSize=350m
-XX:ReservedCodeCacheSize=240m
-XX:+UseConcMarkSweepGC
-XX:SoftRefLRUPolicyMSPerMB=50
-ea
-Dsun.io.useCanonCaches=false
-Djava.net.preferIPv4Stack=true
-XX:+HeapDumpOnOutOfMemoryError
-XX:-OmitStackTraceInFastThrow
Comments