IntelliJ IDEA修改系統緩存目錄

閱讀更多

intellij IDEA在第一次啓動時,會在${user.home}目錄下創建以.IntelliJIdea開頭的文件夾,用來存放IDEA的配置信息、插件和緩存信息。隨着工具使用時間越多,這個文件夾會愈來愈大。若是用戶目錄和系統盤在一個分區,那系統盤分區可用空間就會變小,系統重裝時,這個目錄還會被刪除。java

因而咱們須要將此目錄修改到其餘分區,修改很簡單,以下:緩存

在IDEA安裝目錄的bin文件夾中找到idea.properties文件,咱們須要裏面的幾項內容:ide

 

Properties代碼 複製代碼  收藏代碼
  1. # Use ${idea.home} macro to specify location relative to IDE installation home.  
  2. # Use ${xxx} where xxx is any Java property (including defined in previous lines of this file) to refer to its value.  
  3. # Note for Windows users: please make sure you're using forward slashes (e.g. c:/idea/system).  
  4.   
  5. #---------------------------------------------------------------------  
  6. # Uncomment this option if you want to customize path to IDE config folder. Make sure you're using forward slashes.  
  7. #---------------------------------------------------------------------  
  8. #打開confi的配置  
  9. # idea.config.path=${user.home}/config  
  10.    
  11. #---------------------------------------------------------------------  
  12. # Uncomment this option if you want to customize path to IDE system folder. Make sure you're using forward slashes.  
  13. #---------------------------------------------------------------------  
  14. #打開system的配置  
  15. # idea.system.path=${user.home}/system  
  16.    
  17. #---------------------------------------------------------------------  
  18. # Uncomment this option if you want to customize path to user installed plugins folder. Make sure you're using forward slashes.  
  19. #---------------------------------------------------------------------  
  20. #打開plugins的配置  
  21. # idea.plugins.path=${idea.config.path}/plugins  
  22.    
  23. #---------------------------------------------------------------------  
  24. # Uncomment this option if you want to customize path to IDE logs folder. Make sure you're using forward slashes.  
  25. #---------------------------------------------------------------------  
  26. #打開log的配置  
  27. # 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,以下是修改後的結果工具

 

 

Java代碼 複製代碼  收藏代碼
  1. #---------------------------------------------------------------------  
  2. # Uncomment this option if you want to customize path to IDE config folder. Make sure you're using forward slashes.  
  3. #---------------------------------------------------------------------  
  4. idea.config.path=D:/Program/JetBrains/.IntelliJIdea/config  
  5.   
  6. #---------------------------------------------------------------------  
  7. # Uncomment this option if you want to customize path to IDE system folder. Make sure you're using forward slashes.  
  8. #---------------------------------------------------------------------  
  9. 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

相關文章
相關標籤/搜索