idea系列产品,一般会在用户目录创建 配置 和 缓存 目录:
%appdata%\jetbrains
%localappdata%\jetbrains
一般会展示为:
c:\users\<username>\appdata\roaming\jetbrains
c:\users\<username>\appdata\local\jetbrains
一般占用 少则 几百m,多则 几个g。
以下总结了下更改配置目录的方法。
fleet
在用户目录 c:\users\<username>
下,创建 fleet.properties
文件
fleet.config.path=d:/appdata/fleet/config
fleet.caches.path=d:/appdata/fleet/caches
说明: 上述 修改默认 配置 和 缓存 目录,路径使用 /
代替 \
。
idea 系列
默认 idea 系列,在安装目录下 bin
目录 idea.properties
文件可配置目录。
有两类 配置目录
和 缓存目录
对应:
- idea.config.path
- idea.system.path
说明:
属性 | 说明 | 默认目录(windows) |
---|---|---|
idea.config.path | 配置文件目录 | %appdata%\jetbrains<product> |
idea.plugins.path | 插件目录 (默认在{配置目录}/plugins) | %localappdata%\jetbrains<product> |
idea.system.path | 系统目录(缓存和文件历史) | %localappdata%\jetbrains<product> |
idea.log.path | 日志目录(默认在 {系统目录}/log) | %localappdata%\jetbrains<product>\log |
修改:
安装目录/bin下 idea.properties
自定义配置缓存目录
idea.config.path=d:/appdata/jetbrains/ideaic/config
idea.config.path=d:/appdata/jetbrains/ideaic/system
idea.plugins.path=${idea.config.path}/plugins
idea.log.path=${idea.system.path}/log
android studio
默认 android studio 缓存目录在:
c:\users\<username>\appdata\google\androidstudio2023.1
修改 android studio 安装目录下 idea.properties
文件:
idea.system.path=d:/appdata/google/androidstuio
jetbrains toolbox 安装和配置
相对于手动修改,推荐安装 jetbrains toolbox
可以方便图形化 安装和配置目录。
以 intellij idea community edition
为例:
- 在 toolbox 里,
intellij idea community edition
菜单,选 设置 - 展开 配置
- 勾选 自定义 jvm 选项文件位置,然后配置 目录
发表评论