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

相关文章
相关标签/搜索