3

I installed Intellij IDEA from on my arch using yay. I worked fine but recently it started doing this:

john@arch-thinkpad ~ [1]> intellij-idea-ultimate-edition
Unrecognized VM option 'UseConcMarkSweepGC'
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

How can I fix this problem so I can run intellij IDEA normaly like in good old times ?
Thank you for help

Jan Černý
  • 1,185
  • 2
  • 24
  • 46

3 Answers3

5

You can switch to java-11. Intellij calls the vm with an option that is no longer supported by java 15.

If you start Intellij via terminal (and java 11) it shows you that message:

OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.

For now this workaround works. Remember to change the Java version in arch with archlinux-java.

Install java 11:

$sudo pacman -S jdk11-openjdk

Switch to java 11:

$sudo archlinux-java set java-11-openjdk
Jan Černý
  • 1,185
  • 2
  • 24
  • 46
Jannusch
  • 66
  • 1
2

Alternatively you can remove that option and use it with the latest JDK.

In /opt/clion/bin/clion64.vmoptions, comment out / delete the following line

-XX:+UseConcMarkSweepGC
2

Uzumaki D. Ichigo's suggestion does not involves changing the JDK.

However the "idea.vmoptions" file in the /bin directory is overwritten when idea runs. JVM options must be changed in the file with the same name, but in the configuration directory as JetBrains documentation states. This can be done following the instructions in the official documentation for idea and clion:

Configuration directory

Syntax ~/.config/JetBrains/

Example ~/.config/JetBrains/IntelliJIdea2020.3

It is not needed to cut the line.
It can be just commented out:

#-XX:+UseConcMarkSweepGC
Glorfindel
  • 805
  • 2
  • 10
  • 19