intellij IDEA在第一次啓動時,會在${user.home}目錄下創建以.IntelliJIdea開頭的文件夾,用來存放IDEA的配置信息、插件和緩存信息。隨着工具使用時間越多,這個文件夾會愈來愈大。若是用戶目錄和系統盤在一個分區,那系統盤分區可用空間就會變小,系統重裝時,這個目錄還會被刪除。java
因而咱們須要將此目錄修改到其餘分區,修改很簡單,以下:緩存
在IDEA安裝目錄的bin文件夾中找到idea.properties文件,咱們須要裏面的幾項內容:ide
- # Use ${idea.home} macro to specify location relative to IDE installation home.
- # Use ${xxx} where xxx is any Java property (including defined in previous lines of this file) to refer to its value.
- # Note for Windows users: please make sure you're using forward slashes (e.g. c:/idea/system).
- #---------------------------------------------------------------------
- # Uncomment this option if you want to customize path to IDE config folder. Make sure you're using forward slashes.
- #---------------------------------------------------------------------
- #打開confi的配置
- # idea.config.path=${user.home}/config
- #---------------------------------------------------------------------
- # Uncomment this option if you want to customize path to IDE system folder. Make sure you're using forward slashes.
- #---------------------------------------------------------------------
- #打開system的配置
- # idea.system.path=${user.home}/system
- #---------------------------------------------------------------------
- # Uncomment this option if you want to customize path to user installed plugins folder. Make sure you're using forward slashes.
- #---------------------------------------------------------------------
- #打開plugins的配置
- # idea.plugins.path=${idea.config.path}/plugins
- #---------------------------------------------------------------------
- # Uncomment this option if you want to customize path to IDE logs folder. Make sure you're using forward slashes.
- #---------------------------------------------------------------------
- #打開log的配置
- # idea.log.path=${idea.system.path}/log
# Use ${idea.home} macro to specify location relative to IDE installation home. # Use ${xxx} where xxx is any Java property (including defined in previous lines of this file) to refer to its value. # Note for Windows users: please make sure you're using forward slashes (e.g. c:/idea/system). #--------------------------------------------------------------------- # Uncomment this option if you want to customize path to IDE config folder. Make sure you're using forward slashes. #--------------------------------------------------------------------- #打開confi的配置 # idea.config.path=${user.home}/config #--------------------------------------------------------------------- # Uncomment this option if you want to customize path to IDE system folder. Make sure you're using forward slashes. #--------------------------------------------------------------------- #打開system的配置 # idea.system.path=${user.home}/system #--------------------------------------------------------------------- # Uncomment this option if you want to customize path to user installed plugins folder. Make sure you're using forward slashes. #--------------------------------------------------------------------- #打開plugins的配置 # idea.plugins.path=${idea.config.path}/plugins #--------------------------------------------------------------------- # Uncomment this option if you want to customize path to IDE logs folder. Make sure you're using forward slashes. #--------------------------------------------------------------------- #打開log的配置 # idea.log.path=${idea.system.path}/log
將idea.config.path和idea.system.path裏面的${user.home}改爲將要存放目錄的位置,我這裏修改成D:/Program/JetBrains,以下是修改後的結果工具
- #---------------------------------------------------------------------
- # Uncomment this option if you want to customize path to IDE config folder. Make sure you're using forward slashes.
- #---------------------------------------------------------------------
- idea.config.path=D:/Program/JetBrains/.IntelliJIdea/config
- #---------------------------------------------------------------------
- # Uncomment this option if you want to customize path to IDE system folder. Make sure you're using forward slashes.
- #---------------------------------------------------------------------
- idea.system.path=D:/Program/JetBrains/.IntelliJIdea/system
#--------------------------------------------------------------------- # Uncomment this option if you want to customize path to IDE config folder. Make sure you're using forward slashes. #--------------------------------------------------------------------- idea.config.path=D:/Program/JetBrains/.IntelliJIdea/config #--------------------------------------------------------------------- # Uncomment this option if you want to customize path to IDE system folder. Make sure you're using forward slashes. #--------------------------------------------------------------------- idea.system.path=D:/Program/JetBrains/.IntelliJIdea/system
注意:必定要將配置項前面的註釋符(#)去掉,不然不生效。this
接下來,重啓IDEA工具就能夠了。idea