Modifying IDEA's idea.vmoptions parameter causes IDEA to fail to open (ReservedCodeCacheSize)

Cause of the incident

Maven OOMed when importing dependencies, so I suspected that the memory was too small. I tried to modify the parameters of idea.vmoptions, and then found that IDEA could not be opened after restarting, nor could it be opened after uninstalling and reinstalling. . .

In fact, if the guide package explodes OOM, you should adjust the parameters in the picture below, but this is a story for another day.

Insert image description here

Solutions

Check the IDEA log to see what errors are reported when running, but the existing log is the log when IDEA is running. The latest IDEA cannot be opened. In fact, no log is generated at all. Later, we found that we can open IDEA through the command line and check the error information.

Open finder->Applications->idea.app->Right-click->Show package contents->Then MaxOS->Double-click the shell script (idea)

Insert image description here

The error message indicates that ReservedCodeCacheSizethe maximum size is 2G. The parameter I wrote is 4G, and the parameters are illegal. . . idea.vmoptionsJust modify the file parameters in the error message .

Insert image description here

Guess you like

Origin blog.csdn.net/m0_46521785/article/details/132197726