IntelliJ IDEA配置缓存地址

时间:2022-03-28 10:43:08

  • idea的配置缓存路径是保存配置文件和插件的本地目录,对idea上的所有个人修改全都储存在那里
  • 相比于eclipse的免安装、解压即用来说,一旦系统重装或者idea重装又没有进行备份的情况下,个人对idea的个性化设置就会丢失
  • 而且默认路径时c盘,随着idea的使用和项目的创建,缓存目录也会不断增大,极大的占用的了系统空间资源
  • 可以将缓存目录的路径修改的其他盘符或者移动设备上,当在其他电脑工作时,只用安装idea和配置缓存地址,软件就像在自己的电脑上一样的配置。

方法如下(idea14为例):

1.先找到c盘下的默认缓存文件夹,路径:C:UsersAdministrator.IntelliJIdea14

2.将.IntelliJIdea14文件夹复制到其他地方,如D盘、U盘、移动硬盘等,并记录路径地址

3.打开idea的默认安装目录下的bin文件夹(我安装在F盘为例)

地址:F:SoftWareIdeaIntelliJ IDEA 14.0.2bin

找到idea.properties文件,用记事本打开找到:

  • #---------------------------------------------------------------------
  • # Uncomment this option if you want to customize path to
  • # IDE config folder. Make sure you're using forward slashes.
  • #---------------------------------------------------------------------
  • # idea.config.path=${user.home}/.IntelliJIdea14/config
  • #---------------------------------------------------------------------
  • # Uncomment this option if you want to customize path to
  • # IDE system folder. Make sure you're using forward slashes.
  • #---------------------------------------------------------------------
  • # idea.system.path=${user.home}/.IntelliJIdea14/system
  • #---------------------------------------------------------------------
  • # Uncomment this option if you want to customize path to
  • # user installed plugins folder. Make sure you're using forward slashes.
  • #---------------------------------------------------------------------
  • # idea.plugins.path=${user.home}/.IntelliJIdea14/config/plugins

将里面的部分内容替换:

  • #---------------------------------------------------------------------
  • # Uncomment this option if you want to customize path to
  • # IDE config folder. Make sure you're using forward slashes.
  • #---------------------------------------------------------------------
  • idea.config.path=F:/SoftWare/.IntelliJIdea13/config
  • #---------------------------------------------------------------------
  • # Uncomment this option if you want to customize path to
  • # IDE system folder. Make sure you're using forward slashes.
  • #---------------------------------------------------------------------
  • idea.system.path=F:/SoftWare/.IntelliJIdea13/system
  • #---------------------------------------------------------------------
  • # Uncomment this option if you want to customize path to
  • # user installed plugins folder. Make sure you're using forward slashes.
  • #---------------------------------------------------------------------
  • idea.plugins.path=F:/SoftWare/.IntelliJIdea13/plugins

也就是将${user.home}/.IntelliJIdea14部分替换成我们复制出来的缓存文件的路径,把前面的#注释去掉并保存

(这里要注意 / 符号的方向)

重新打开idea时就会和之前使用的一样了,由于插件的更新失效问题,可能会有插件的错误,重新安装插件即可,主题设置和习惯设置等个性化设置都会保留

我在更新14版本后配置13的缓存,没有出现错误情况

如果是破解过的idea这时可能会让你重新注册,重新注册不会影响配置缓存