What to see when IntelliJ doesn't start on Mac

IntelliJ was so heavy that I couldn't use it, so I messed with VMOption and it stopped working ... I've repaired it, so I'll leave it at the memo level so I don't forget it.

Launch directly from the terminal

console


/Applications/IntelliJ\ IDEA.app/Contents/MacOS/idea 
2020-01-09 13:20:00.633 idea[24470:651890] allVms required 1.8*,1.8+
2020-01-09 13:20:00.636 idea[24470:651896] Value of IDEA_VM_OPTIONS is (null)
2020-01-09 13:20:00.636 idea[24470:651896] Processing VMOptions file at /Users/hisayuki/Library/Preferences/IntelliJIdea2019.3/idea.vmoptions
2020-01-09 13:20:00.636 idea[24470:651896] Done
OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
Error occurred during initialization of VM
Multiple garbage collectors selected

In case of error, it is likely that the memory setting of the VM At this time, it was a mistake to add the options -XX: + UseG1GC and -XX: -UseParNewGC.

Modify VM Option

console


vi /Users/<MAC users>/Library/Preferences/IntelliJIdea2019.3/idea.vmoptions

Before correction

-Xms2G
-Xmx4G
-XX:ReservedCodeCacheSize=240m
-XX:+UseCompressedOops
-Dfile.encoding=UTF-8
-XX:+UseConcMarkSweepGC
-XX:SoftRefLRUPolicyMSPerMB=50
-ea
-Dsun.io.useCanonCaches=false
-Djava.net.preferIPv4Stack=true
-XX:+HeapDumpOnOutOfMemoryError
-XX:-OmitStackTraceInFastThrow
-Xverify:none

-XX:ErrorFile=$USER_HOME/java_error_in_idea_%p.log
-XX:HeapDumpPath=$USER_HOME/java_error_in_idea.hprof

-XX:+UseG1GC
-XX:-UseParNewGC

Revised

-Xms2G
-Xmx4G
-XX:ReservedCodeCacheSize=240m
-XX:+UseCompressedOops
-Dfile.encoding=UTF-8
-XX:+UseConcMarkSweepGC
-XX:SoftRefLRUPolicyMSPerMB=50
-ea
-Dsun.io.useCanonCaches=false
-Djava.net.preferIPv4Stack=true
-XX:+HeapDumpOnOutOfMemoryError
-XX:-OmitStackTraceInFastThrow
-Xverify:none

-XX:ErrorFile=$USER_HOME/java_error_in_idea_%p.log
-XX:HeapDumpPath=$USER_HOME/java_error_in_idea.hprof

(Reference) How to check the default value

If you don't know, you can return to the default value for the time being, so this is a reference method.

$ cat /Applications/IntelliJ\ IDEA.app/Contents/bin/idea.vmoptions 
-Xms128m
-Xmx750m
-XX:ReservedCodeCacheSize=240m
-XX:+UseConcMarkSweepGC
-XX:SoftRefLRUPolicyMSPerMB=50
-ea
-XX:CICompilerCount=2
-Dsun.io.useCanonPrefixCache=false
-Djava.net.preferIPv4Stack=true
-Djdk.http.auth.tunneling.disabledSchemes=""
-XX:+HeapDumpOnOutOfMemoryError
-XX:-OmitStackTraceInFastThrow
-Djdk.attach.allowAttachSelf=true
-Dkotlinx.coroutines.debug=off
-Djdk.module.illegalAccess.silent=true
-XX:+UseCompressedOops
-Dfile.encoding=UTF-8

Recommended Posts

What to see when IntelliJ doesn't start on Mac
When Kubernetes doesn't start on Docker Desktop for Mac
What to do if TextToSpeech doesn't work on Android 11
What to do if you get a port error when docker-compose up on Mac
What I did when I stumbled on IntelliJ gradle 2.2 → 2.6 environment migration
Notes on character encoding when migrating from windows to Mac
What to do if you go offline due to SSL certificate error when running Jenkins on Mac
What to do when javax.batch.operations.JobStartException occurs
What to do when Blocked Host: "host name" appears in Ruby on Rails
Notes on what to do when EC2 is set up with t2.micro
What to do when "call'Hoge.connection' to establish a connection" appears on rails c
Notes on what to do when a WebView ClassNotFoundException occurs in JavaFX 12
How to check Java installed on Mac
When Gradle build stops when importing on Mac
Check when nvidia-smi on Ubuntu doesn't work
What to do when a javax.el.PropertyNotWritableException occurs
How to install Eclipse (Photon) on Mac
How to switch Java versions on Mac
What to do when undefined method ʻuser_signed_in?'
What to do when you think you can't do Groovy-> Java in IntelliJ IDEA CE
What to do when "Nil location provided. Can't build URI." Appears on CarrierWave
What to do when is invalid because it does not start with a'-'
What to do if the rails server doesn't run out on AWS cloud9
Migration from Eclipse to IntelliJ (on the way)
Write a dockerfile to start jupyter-lab on ubuntu
Until you start developing android apps on mac
When the server fails to start in Eclipse
What I did when I converted java to Kotlin
Internal commands when running Kotlin on IntelliJ IDEA
What to do when debugging "Source not found"
What do you use when converting to String?
What to do when IllegalStateException occurs in PlayFramework
What to do when booting Ubuntu on WSL2 and getting "Process terminated with code 1"
What to do if you get a NoClassDefFoundError when trying to run eclipse on Java9