Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to force IntelliJ to use a different home folder

I have a computer with two hard drives. In the first one, an SSD disk, I have Windows partition (C) and on the second one (D), a raid volume, I install all the programs. I also moved my user folders (desktop, documents, downloads, pictures and videos) to D:/Users/David.

After installing IntelliJ Idea on D:/Program Filles(x86) a .IntelliJIdea13 directory appeared on D:/Users/David. No problem with this as all was working nice. Then I installed Scala plugin, created a new SBT project and build it. After this, the .sbt directory used by SBT was in C:/Users/David/.sbt but the references to the libraries in my project are pointing to D:/Users/David/.sbt. The question is, how can I force IntelliJ Idea or Scala plugin to download the libraries to D:/Users/David.sbt?

like image 826
David Moreno García Avatar asked Oct 19 '14 10:10

David Moreno García


2 Answers

Not 100% sure if this can be a solution, you can change the HOME folder of Intellij IDEA. Look for the folder where the idea executable is. In Linux I have on

 ~/applications/idea13/bin  

On Windows you can check the properties of the menu item. There should be file idea.properties that contains the home folder location of the idea files.

You can find more information here that describe more details:

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

On the other hand you can change the location of your project to D:/Users/David. you should also have a look inside the project folder, there should be a .idea folder with has a library directory. They contains the location of the libs used in the project with their paths.

like image 170
dawez Avatar answered Oct 08 '22 01:10

dawez


As dawez allready answered, you should edit idea.properties to set config, system, plugins and log paths.

But if you want to change the user.home path, then you must edit idea.exe.vmoptions file. Just add the following at the end of the file:

-Duser.home=your_new_user_home_path

If you use idea64.exe then you should edit idea64.exe.vmoptions file.

like image 28
Davor Josipovic Avatar answered Oct 08 '22 02:10

Davor Josipovic