-
-
Save baekilda/f0e9acf8c81d6a70547b1dc795b4ecbe to your computer and use it in GitHub Desktop.
IntelliJ IDEA Java 17 ZGC VM Options
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Personal Feeling: using the following jvm config is smoother than default | |
# My Machine: Macbook pro M1max 64GB | |
# More Info: https://github.com/FoxxMD/intellij-jvm-options-explained | |
# Prerequisite (Intellij < 2022.2) | |
# 1. Install JetBrain Runtime 17 osx-aarch64 for Apple Silicon, https://github.com/JetBrains/JetBrainsRuntime/releases | |
# 2. Switch the runtime from JetBrain Runtime 11 to 17, https://www.jetbrains.com/help/idea/switching-boot-jdk.html | |
# JetBrain Toolbox | |
# Memory | |
-Xms2048m | |
-Xmx16384m | |
# Enable ZGC | |
-XX:+UseZGC | |
# Reference from https://gist.github.com/kenvix/7b9f8c10fffcc90978589ab12ba50d02 | |
# Tested, without the following flag won't work | |
# Enable IDEA on JDK 17 | |
-Djdk.module.illegalAccess.silent=true | |
-Dsun.java2d.metal=true | |
--illegal-access=permit | |
--add-opens=java.desktop/java.awt.event=ALL-UNNAMED | |
--add-opens=java.desktop/sun.font=ALL-UNNAMED | |
--add-opens=java.desktop/java.awt=ALL-UNNAMED | |
--add-opens=java.desktop/sun.awt=ALL-UNNAMED | |
--add-opens=java.base/java.lang=ALL-UNNAMED | |
--add-opens=java.base/java.util=ALL-UNNAMED | |
--add-opens=java.base/jdk.internal.misc=ALL-UNNAMED | |
--add-opens=java.base/jdk.internal.loader=ALL-UNNAMED | |
--add-opens=java.desktop/javax.swing=ALL-UNNAMED | |
--add-opens=java.desktop/sun.swing=ALL-UNNAMED | |
--add-opens=java.desktop/sun.lwawt.macosx=ALL-UNNAMED | |
--add-opens=java.desktop/sun.lwawt=ALL-UNNAMED | |
--add-opens=java.desktop/javax.swing.plaf.basic=ALL-UNNAMED | |
--add-opens=java.desktop/java.awt.peer=ALL-UNNAMED | |
--add-opens=java.desktop/javax.swing.text.html=ALL-UNNAMED | |
--add-opens=java.desktop/sun.awt.windows=ALL-UNNAMED | |
--add-opens=java.desktop/sun.awt.image=ALL-UNNAMED | |
--add-opens=java.desktop/sun.java2d=ALL-UNNAMED | |
--add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED | |
--add-opens=jdk.jdi/com.sun.tools.javac.code=ALL-UNNAMED | |
--add-opens=jdk.jdi/com.sun.tools.jdi=ALL-UNNAMED | |
--add-opens=java.base/com.sun.tools.jdi=ALL-UNNAMED | |
--add-exports=java.desktop/sun.font=ALL-UNNAMED | |
--add-exports=java.desktop/com.apple.eawt=ALL-UNNAMED | |
--add-exports=java.desktop/com.apple.laf=ALL-UNNAMED | |
--add-exports=java.desktop/com.apple.eawt.event=ALL-UNNAMED | |
--add-exports=java.desktop/sun.awt.image=ALL-UNNAMED | |
-XX:+IgnoreUnrecognizedVMOptions |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment