Start two instances of IntelliJ IDE

前端 未结 7 1673
走了就别回头了
走了就别回头了 2020-12-23 13:13

Well my question is pretty simple, how do I start two instances of IntelliJ (community edition). When I have one instance started and I try to start another one, all that ha

7条回答
  •  没有蜡笔的小新
    2020-12-23 13:26

    CrazyCoder has roughly the right idea. However, setting the config file alone was not sufficient for me to run multiple instances. Here are my steps to get this going (in GNU/Linux, I am sure you can figure out equivalent in other systems):

    1. Create a folder/directory per instance you want to run.

      mkdir -p ~/idea/instance-0
      
    2. Go to the installation directory (e.g. /opt/intellij) and copy the idea.properties (in bin) file over to your instance directory.

      cp /opt/intellij/bin/idea.properties ~/idea/instance-0/
      
    3. Copy 3 more directories: system, plugins, and config. I highly recommend doing this without the running instance

      cp -r /opt/intellij/system ~/idea/instance-0/
      cp -r /opt/intellij/plugins ~/idea/instance-0/
      cp -r /opt/intellij/config ~/idea/instance-0/
      mkdir ~/idea/instance-0/log
      
    4. Open your idea.properties file and update the configurations for your directories:

      #---------------------------------------------------------------------
      # 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}/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}/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}/plugins
      #---------------------------------------------------------------------
      # Uncomment this option if you want to customize path to IDE logs folder. Make sure you're using forward slashes.
      #---------------------------------------------------------------------
      idea.log.path=${user.home}/log
      
    5. Now, you can start IntelliJ with the new setup:

      IDEA_PROPERTIES=~/idea/instance-0/idea.properties /opt/intellij/bin/idea
      

    Obviously, you probably want to put the command in a script file for invocation. This seems to work for me.

提交回复
热议问题