Is there an easy way to put my entire installation of Intellij on a USB stick? - intellij-idea

I'm considering switching from Eclipse to Intellij. One thing I like about Eclipse is that the whole installation is just a folder, and I can put that on a USB stick and copy it to another computer if I want. All of my plugins, settings, and everything else come with me and all I have to do is simply copy a folder.
Is there any way I could do this with Intellij?

Yes, it's possible, just copy the installation directory to the flash drive, then edit IDEA_HOME\bin\idea.properties file, change the values of idea.config.path and idea.plugins.path to the relative location, like: ../config and ../user-plugins (locations are relative to IDEA bin directory).
Now copy your original settings and third-party plug-ins (if any):
${user.home}/.IntelliJIdea10/config => usb:/IDEA_HOME/config
${user.home}/.IntelliJIdea10/config/plugins => usb:/IDEA_HOME/user-plugins
Note that it's not recommended to change idea.system.path variable, so that it remains on the fast local drive, otherwise it could affect IDEA performance and occupy a lot of USB drive space.

One thing you could also do is to use the ${idea.home} path variable. I described in an article how you can create a portable version of IntelliJ IDEA including a version of the JDK.
https://leolabs.org/blog/making-intellij-portable/
I hope it can help you, as this is my first article in English ;)
Regards
leolabs

In addition to the answer of CrazyCoder:
To copy the "system" folder of IntelliJ / PHPStorm to the usb memory stick is required if you want that IntelliJ / PHPStorm behave like a portable app.
To get the desired folders install IntelliJ / PHPStorm to your HDD and run it at least one time.
On Windows 7 the path is (copy the folders to your usb memory stick):
%USERNAME%\.WebIde10\config\ => usb:/IDEA_HOME/config
%USERNAME%\.WebIde10\system\ => usb:/IDEA_HOME/user-plugins
Note that user-plugins is not created at first start of IntelliJ / PHPStorm, so create it on your usb memory stick.
Edit the idea.properties as CrazyCoder told you and change all 3 values:
idea.config.path
idea.plugins.path
idea.system.path

open c:\Program Files\JetBrains\IntelliJ IDEA 14.1.3\bin\idea.properties
change # idea.config.path=${user.home}/.IntelliJIdea/config to idea.config.path=../PortableSetting/config
change # idea.system.path=${user.home}/.IntelliJIdea/system to idea.system.path=../PortableSetting/system
change # idea.plugins.path=${idea.config.path}/plugins to idea.plugins.path=../PortableSetting/config/plugins
change # idea.log.path=${idea.system.path}/log to idea.log.path=../PortableSetting/system/log
make PortableSetting folder in c:\Program Files\JetBrains\IntelliJ IDEA 14.1.3\
copy content of C:\Documents and Settings\User\.IntelliJIdea14\ to c:\Program Files\JetBrains\IntelliJ IDEA 14.1.3\PortableSetting\
copy c:\Program Files\JetBrains\IntelliJ IDEA 14.1.3 to USB and enjoy!
I wrote this answer for windows XP default directory.
for more information about default directory look at here.
I read other people answers and made an step by step answer.

You can use portableapps platform for portable intellij. Details description is here.

Related

How to configure IntelliJ products WITHOUT editing files in bin?

I'd like to set some specific options in idea.vmoptions and idea.properties for IntelliJ IDEA 14, but I don't have access to those files in C:\Program Files\... (yes, that's Windows, don't troll ;)
Is there a folder in %UserProfile% or an environment variable I could set to read those files (both vmoptions and properties!) from elsewhere?
Please don't suggest to copy the whole IDEA folder elsewhere, there's a reason why I can't access it. I would be interested in a Linux solution too, the same would most likely work on Windows.
My Research
For Mac there're specific instructions at Increasing Memory Heap, but for Linux and Windows it's just filename which are trivial to find out anyway.
I also found IntelliJ IDEA files locations, but it says can be modified in IDEA_HOME\bin\idea.properties which doesn't help since I can't access that file, but want to change properties in it.
Update: Simple Answer
Create IDEA_PROPERTIES and IDEA_VM_OPTIONS environment variables and point them to the files you want, restart IDE, done.
Also see documentation for more (and maybe report that it lacks any mention of IDEA_PROPERTIES).
You can use %USERPROFILE%\.IntelliJIdea14\idea%BITS%.exe.vmoptions on Windows as custom options file. I tried it and it works.
Another way that I haven't tried, but I think should work, is to copy idea.bat and edit it to use the file you need.

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?
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.
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.
JetBrains had added complete set of features to support such a case and this is described here:
Changing IDE default directories used for config, plugins, and caches storage

IntelliJ-IDEA: Where are settings files saved for v11.x on Windows 7?

When I load/save settings on my PC for IntelliJ-IDEA v11+ Ultimate on Windows 7, it is super slow (seconds). I think the settings are being saved on a network drive (corporate setup), but I want to confirm.
What is the default location on Windows 7 for IntelliJ-IDEA settings files?
How can I change the location of settings files?
UPDATE
I checked my idea.properties file here: C:\Program Files (x86)\JetBrains\IntelliJ IDEA 11.1.5\bin\idea.properties. I see this entry (commented-out):
# idea.config.path=${user.home}/.IntelliJIdea/config
My insane corporate setup has Java's user.home mapped to \\UBSPROD.MSAD.UBS.NET\UserData\arpeke\RF. There, I found the folder named .IntelliJIdea with my settings.
IntelliJ saves its config and indexes, which can amount to several gigs worth of data, to your home directory. It's been that way for approximately "a long time". In my experience, if you have default network mounts, your home dir will be set to one of those, so that's very likely your problem. Edit <idea dir>/bin/idea.properties to change the location where it saves stuff. There will be a handful of properties to change because it calls things out individually rather than having one, overall directory.
Props to Ryan for the hint I needed. Posting a detailed answer here, because I could not find the answer anywhere else on the Net.
Discover your Java's user.home System property settings.
See this Q&A: On Windows 7, how does Java JVM set "user.home" System property?
Or, try in an Java IDE: System.out.println(System.getProperty("user.home"));
You may surprised by its value!
Let us suppose it is C:\Users\user123
There, you will find a folder named .IntelliJIdea, and sub-folder within named config.
If the .IntelliJIdea folder is stored on a network drive, you may find IntelliJ performance less than ideal.
Modify your idea.properties file. Possible full path: C:\Program Files (x86)\JetBrains\IntelliJ IDEA 11.1.5\bin\idea.properties
Modify options for config, system, plugins, and logs. Example: idea.config.path=${user.home}/.IntelliJIdea/config => idea.config.path=c:/local/path/.IntelliJIdea/config
Update
Official Knowledge Base article from JetBrains: http://intellij-support.jetbrains.com/entries/23348963

Unable to copy files from file system to IntelliJ IDEA 10.5

I have just started using IntelliJ IDEA.I am really novice to this IDE, so please bear if my question sounds silly.
I am facing a problem regarding copying of files from OS's File explorer to IntelliJ Project.
I am using following versions:
Operating System: Ubuntu v. 11.04
IntelliJ IDEA: v. 10.5.1
JDK: v. 1.6.0_27
For e.g. in the following image I have created a project having a Maven module.
I am unable to copy a schema file (.xsd) on my file system into the folder ..../src/main/conf/vehAvailRate.I tried out so many times but the file is not getting copied.Also I tried the Synchronize feature too but that too didn't helped.However when I open the project in file system and copy my desired schema file there ,IntelliJ IDEA relfects the change.
Am I doing something wrong or there is some other reason behind this behavior?
Thanks,
Jignesh
Such copy should be performed externally, using your favorite file manager. IDEA will refresh files under its project directory automatically.
If something goes wrong, check idea.log file in ~/.IntelliJIdea10/system/log directory.

Where does IntelliJ IDEA store shelf changes on the local drive?

I want to write a small backup script that would take my shelf changes in IntelliJ from my local drive and put them on a network drive. But I can't locate the path to where these are stored on my local drive.
Any ideas?
Instead of giving the fish, here is how to fish:
Find an action item:
⌘ +Shift+A (on a Mac) or Ctrl +Shift+A (on Windows/Linux)
Type "change shelve"
Check the location where it is being stored
For me it's $user.home/.IntelliJIdea90/config/shelf
I'm not sure if that changes on OSX or not. It seems like it might be different, but once you find the .IntelliJIdea90 directory, it's in /config/shelf.
Update for comment
Here is my .IntelliJIdea80/config/shelf directory after shelving some changes in 8.1.3:
skrall#skralldesktop:~/.IntelliJIdea80/config/shelf$ ls
AnotherTestOfshelving.patch
skrall#skralldesktop:~/.IntelliJIdea80/config/shelf$
I'll startup my Windows VM and see if it's the same place on Windows.
Update With Windows
Same place. This is Vista, so it's C:\Users\skrall\.IntelliJ90\config\shelf Can you search your local hard drive for a directory named shelf? Or, if that doesn't work, search for *.patch
IntelliJ IDEA 15 on linux, shelved changes seem to be stored as individual files in the project directory, under the .shelf directory.
Idea can also store shelved changes in <projectFolder>/.idea/shelf/ directory. Try to check this option.
For IntelliJ 10 on mac, for me its in ~/Library/Preferences/IntelliJIdea10/Shelf
IntelliJ IDEA 12 on Mac, stores them in ~/Library/Preferences/IntelliJIdea12/shelf/*.patch
IntelliJ IDEA 12 on Windows7, default location
%UserHome%\.IdeaIC12\config\shelf\*.patch
i.e. _IDE_config_folder_\shelf\*.patch
Note non default IDE config folder location can be looked up in _IDEA_HOME_\bin\idea.properties
idea.config.path=${user.home}/.IdeaIC/config