JVM args for IDEA built from source during plugin development


When I build and run the IDEA source code from another IDEA instance, where does the IDEA instance I just built get the JVM arguments from?

I can see in build/idea-sandbox/system/log/idea.log that it gets parameters such as:

-Dapple.awt.fileDialogForDirectories=true -Dapple.laf.useScreenMenuBar=true -Didea.classpath.index.enabled=false -XX:MaxPermSize=250m -Xms256m -Xmx512m -Dfile.encoding=UTF-8 -Duser.country=US -Duser.language=en -Duser.variant -ea

but where does this come from?

I am particularly interested in the useScreenMenuBar setting as it looks like I'll need to set that to false as a workaround. How do I do this?


These are added by the Plugin Devkit automatically (org.jetbrains.idea.devkit.run.PluginRunConfiguration).

You can add


to "VM Options" parameter in Run configuration to override default.


Thanks for the response! I had tried to add it as a "VM Option" to the run configuration and that didn't seem to change anything. (And I also tried to add it to a idea.vmoptions file in the sandbox directory, and I also tried to change parts of the IDEA source code that seemed relevant -- all to no avail.)

Not sure if this matters but I am using Gradle, following the now-recommended path in the IntelliJ Platform SDK DevGuide. Since the other path is being referred to as "Using DevKit", my impression is that I am not using the Plugin Devkit at all. Of course for all I know "using Gradle" might just mean that I am still using DevKit through some layers of abstraction.

Anyway, to clarify, this is how my Run configuration dialog looks like:

This results in the first line of the build log being "Executing task ':runIde -Dapple.laf.useScreenMenuBar=false'", so it's not like the VM options from the dialog are entirely ignored, but the log in build/idea-sandbox/system/log/idea.log shows that the IDEA instance I am building is still started with -Dapple.laf.useScreenMenuBar=true.


Yes, my answer was targeted to Devkit project setup.

The Gradle run configuration VM options wlll only affect execution of Gradle task, but not the started IDE.

Custom VM options/arguments for the IDE must be specified in `runIde` task configuration in your build.gradle file via `jvmArgs` parameter


That worked, amazing, thanks!


Please sign in to leave a comment.