Force IntelliJ to use another Home Directory?

有些话、适合烂在心里 提交于 2019-12-13 01:43:53

问题


I have read this... it does not answer the question.

I would like to have IntelliJ use another location for all of my project files. Currently, it goes to c:\users\ as a default project location.

I want to change that to c:\git.

I tried to change the "Start in" link properties, to no avail.

I don't want to force all of the configuration (ie: the .IdeaIC15 folder) to be relocated, I just want it to go to c:\git when I click "Open project".


回答1:


https://intellij-support.jetbrains.com/hc/en-us/articles/207240985-Changing-IDE-default-directories-used-for-config-plugins-and-caches-storage

Locations can be changed by editing the following file:

IDE_HOME\bin\idea.properties

Follow the comments in idea.properties file to change the defaults, make sure to un-comment the lines defining these properties:

idea.config.path
idea.system.path
idea.plugins.path
idea.log.path



回答2:


To change the directory where project files are located to C:\git:

  1. Select Help->Edit Custom VM Options...
  2. Add the following line to the end of the file that comes up in the editor (*):

    -Duser.home=C:\git

  3. Restart IntelliJ.

(*) The file that comes up in the editor will either be idea64.exe.vmoptions or idea.exe.vmoptions.

Notes:

  • This will update/create a .vmoptions file in your config directory. It does not modify the vmoptions file in your install directory.
  • The above steps do not change the default directory that is used when cloning git repositories. This is the directory that is used in the File->New->Project from Version Control->Git window. You still need to set that directory to C:\git. You only need to set it once.


来源:https://stackoverflow.com/questions/31967923/force-intellij-to-use-another-home-directory

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!