Advanced configuration
Besides the standard options available, IntelliJ IDEA enables you to perform low-level configuration of the underlying platform and the Java runtime.
warning
This may lead to unexpected problems and make your IntelliJ IDEA installation inoperable if you are not sure what you are doing. Contact JetBrains Support for instructions regarding the options and values that might help you with whatever issue you are trying to solve.
JVM options
IntelliJ IDEA runs on the Java Virtual Machine (JVM), which has various options that control its performance. The default options used to run IntelliJ IDEA are specified in the following file:
<IDE_HOME>
<IDE_HOME>
warning
Do not change JVM options in the default file, because it is replaced when IntelliJ IDEA is updated. Moreover, in case of macOS, editing this file violates the application signature.
Configure JVM options
Do one of the following to create a copy of the default file with JVM options in the configuration directory that will override the original file:
On the Help menu, click Edit Custom VM Options.
If you do not have any project open, on the Welcome screen, click Configure and then Edit Custom VM Options.
If you cannot start IntelliJ IDEA, manually copy the default file with JVM options to the IntelliJ IDEA configuration directory.
If you do not have write access to the IntelliJ IDEA configuration directory, you can add the IDEA_VM_OPTIONS
environment variable to specify the location of the file with your preferred JVM options. This file will override both the original default file and the copy located in the IntelliJ IDEA configuration directory.
note
If you are using the Toolbox App, it manages the installation and configuration directory and lets you configure JVM options for every IDE instance. Open the Toolbox App, click the screw nut icon for the necessary instance, and select Settings.
Common options
The default values of the JVM options should be optimal in most cases. The following are the most commonly modified ones:
Option | Description |
---|---|
-Xmx | Limits the maximum memory heap size that the JVM can allocate for running IntelliJ IDEA. Default value depends on the platform. If you are experiencing slowdowns, you may want to increase this value, for example, to set the value to 2048 megabytes, change this option to -Xmx2048m . |
-Xms | Specifies the initial memory allocated by the JVM for running IntelliJ IDEA. Default value depends on the platform. It is usually set to about half of the maximum allowed memory (-Xmx ), for example, -Xms1024m . |
-XX:NewRatio | Specifies the ratio between the size of the young and old generation of the heap. In most cases, a ratio between 2 and 4 is recommended. This will set the size of the young generation to be 1/2 to 1/4 of the old generation correspondingly, which is good when you are often working on one project and only a few files at a time. However, if you are constantly opening new files and switching between several projects, you may need to increase the young generation. In this case, try setting -XX:NewRatio=1 , which will make the young generation as large as the old generation, allowing objects to remain in the young generation for longer. |
For more information about available JVM options, see the java
reference for Windows or macOS/Linux.
Platform properties
IntelliJ IDEA enables you to customize various platform-specific properties, such as the path to user-installed plugins and the maximum supported file size. The default properties used to run IntelliJ IDEA are specified in the following file:
<IDE_HOME>
warning
Do not change platform properties in the default file, because it is replaced when IntelliJ IDEA is updated. Moreover, in case of macOS, editing this file violates the application signature.
Configure platform properties:
Do one of the following to create an empty idea.properties file in the configuration directory that will override the values from the original file:
From the Help menu, select Edit Custom Properties.
If you do not have any project open, on the Welcome screen, click Configure and then select Edit Custom Properties.
If you cannot start IntelliJ IDEA, manually create an empty idea.properties file in the IntelliJ IDEA configuration directory.
If you do not have write access to the IntelliJ IDEA configuration directory, you can add the IDEA_PROPERTIES
environment variable to specify the location of the idea.properties file. The properties in this file will override the corresponding properties in both the original default file and the one located in the IntelliJ IDEA configuration directory.
Common properties
Users often change the following properties:
The default IDE directories may need to be moved, for example, if the user profile drive runs out of space or it is located on a slow disk, if the home directory is encrypted (slowing down the IDE) or located on a network drive, if you want to create a portable installation or exclude caches from home directory backups, and so on.
Property Path to idea.config.path
Configuration directory idea.system.path
System directory idea.plugins.path
Plugins directory idea.log.path
Logs directory Specify paths with forward slashes /, including Windows paths (for example, C:
/idea )./system You can insert properties as variables. For example, use
${user.home}
(standard Java system property) to specify paths relative to the user's home directory:idea.config.path=${user.home}/MyIdeaConfiguration
Limits that can affect performance:
Property Description idea.max.content.load.filesize
Maximum size of files (in kilobytes) that IntelliJ IDEA is able to open. Working with large files can affect editor performance and increase memory consumption. The default value is 20000
.idea.max.intellisense.filesize
Maximum size of files (in kilobytes) for which IntelliJ IDEA provides coding assistance. Coding assistance for large files can affect editor performance and increase memory consumption. The default value is 2500
.idea.cycle.buffer
Maximum size of the console cyclic buffer (in kilobytes). If the console output size exceeds this value, the oldest lines are deleted. To disable the cyclic buffer, set idea.cycle.buffer.size=disabled
.idea.max.vcs.loaded.size.kb
Maximum size (in kilobytes) that IntelliJ IDEA loads for showing past file contents when comparing changes. The default value is 20480
.
IntelliJ IDEA provides a number of other properties that define interaction with the environment (window managers, launchers, file system, and so on). Most of them act like hidden settings (in the sense that they are not evidently exposed), which you may need to enable or disable in certain cases. Change these properties only if advised by JetBrains Support.
Default IDE directories
By default, IntelliJ IDEA stores user-specific files (configuration, caches, plugins, logs, and so on) in the user's home directory. However, you can change the location for storing those files, if necessary.
note
The default IDE directories changed starting from IntelliJ IDEA 2020.1. If you had a previous version, new installations will import configuration from the old directories. For information about the location of the default directories in previous IDE versions, see the corresponding help version, for example: https://www.jetbrains.com/help/idea/2019.3/tuning-the-ide.html#default-dirs.
Configuration directory
The IntelliJ IDEA configuration directory contains user-defined IDE settings, such as keymaps, color schemes, custom VM options, platform properties, and so on.
- Syntax
- %APPDATA%
\JetBrains \<product><version> - Example
- C:
\Users \JohnS \AppData \Roaming \JetBrains \IntelliJIdea2021.1
You can change the location of the IntelliJ IDEA configuration directory using the idea.config.path property.
To share your personal IDE settings, copy the files from the configuration directory to the corresponding folders on another IntelliJ IDEA installation. Make sure that IntelliJ IDEA is not running to avoid erasing the copied files when you shut down the IDE. Depending on which settings you modified, the IntelliJ IDEA configuration directory can contain the following subfolders:
Directory | User settings |
---|---|
codestyles | Code style schemes |
colors | Customized editor color and font schemes |
fileTemplates | User-defined file templates which pertain to the entire IntelliJ IDEA workspace |
filetypes | User-defined file types |
inspection | Code inspection profiles |
keymaps | Customized keyboard shortcuts |
options | Various options, for example, feature usage statistics and macros |
scratches | Scratch files and buffers |
templates | User-defined live templates |
tools | Configuration files for user-defined external tools |
shelf | Shelved changes |
tip
If your settings are synchronized using the Settings Repository plugin, these subfolders are located under settingsRepository in the configuration directory.
If your settings are synchronized through the IDE Settings Sync plugin, these subfolders are located under jba_config in the configuration directory.
System directory
The IntelliJ IDEA system directory contains caches and local history files.
- Syntax
- %LOCALAPPDATA%
\JetBrains \<product><version> - Example
- C:
\Users \JohnS \AppData \Local \JetBrains \IntelliJIdea2021.1
You can change the location of the IntelliJ IDEA system directory using the idea.system.path property.
Plugins directory
The IntelliJ IDEA plugins directory contains user-installed plugins.
- Syntax
- %APPDATA%
\JetBrains \<product><version> \plugins - Example
- C:
\Users \JohnS \AppData \Roaming \JetBrains \IntelliJIdea2021.1 \plugins
You can change the location of the IntelliJ IDEA plugins directory using the idea.plugins.path property.
Logs directory
The IntelliJ IDEA logs directory contains product logs and thread dumps.
- Syntax
- %LOCALAPPDATA%
\JetBrains \<product><version> \log - Example
- C:
\Users \JohnS \AppData \Local \JetBrains \IntelliJIdea2021.1 \log
You can change the location of the IntelliJ IDEA logs directory using the idea.log.path property.
tip
You can open the location of the logs directory using the corresponding Help menu action: Show Log in Explorer on Windows, Show Log in Finder on macOS.