解決Ubuntu IDEA2019版本 無法啟動報錯的問題


本人使用的IDEA版本是2019版本,系統是Ubuntu16.04LTS。不過這個應該和啟動閃退的關系不大。其他系統如macOS遇到無法啟動的問題,也可以使用下面的方法步驟。

1.找到IDEA的安裝目錄

我的安裝目錄在:/home/software/idea-IU-193.5662.53 下,這個具體視系統不同可能位置有所差異

2.進入系統的啟動命令目錄

cd /bin 后可以看到有個 idea.sh的shell腳本。在這里執行該腳本。命令 ./idea.sh

我的這里執行后,提示如下內容:

OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
Error occurred during initialization of VM
Initial heap size set to a larger value than the maximum heap size

 通過報錯可以看出來是IDEA啟動的對堆內存大小設置問題。可能是之前自己設置過值,導致退出IDEA后無法啟動了。

 

3.返回上一目錄,找到IDEA的具體安裝信息

我這里的安裝配置文件是:Install-Linux-tar.txt,打開后可以看到具體的安裝路徑,在下面的文件內標紅的部分,也就是 ~/.IntelliJIdea2019.3/config

IntelliJ IDEA

INSTALLATION INSTRUCTIONS
===============================================================================

  Linux Installation Instructions
  ------------------------------------------------------------------------------
  1. Unpack the IntelliJ IDEA distribution archive that you downloaded to
     where you wish to install the program. We will refer to this destination
     location as your {installation home} below.

  2. Open a console and cd into "{installation home}/bin" and type:

       ./idea.sh

     to start the application. As a side effect, this will initialize various
     configuration files in the ~/.IntelliJIdea2019.3 directory.

  3. [OPTIONAL] Add "{installation home}/bin" to your PATH environment
     variable so that you may start IntelliJ IDEA from any directory.

  4. [OPTIONAL] To adjust the value of the JVM heap size, create
      ~/.IntelliJIdea2019.3/config/idea.vmoptions (or idea64.vmoptions
      if using a 64-bit JDK), and set the -Xms and -Xmx parameters. To see how
      to do this, you can reference the vmoptions file under
      "{installation home}/bin" as a model.

  [OPTIONAL] Changing the location of "config" and "system" directories
  ------------------------------------------------------------------------------
  By default, IntelliJ IDEA stores all your settings under the ~/.IntelliJIdea2019.3/config
  directory and uses ~/.IntelliJIdea2019.3/system as a data cache.
  If you want to change these settings,

  1. Open a console and cd into ~/.IntelliJIdea2019.3/config

  2. Create the file "idea.properties" and open it in an editor. Set the
     idea.system.path and/or idea.config.path variables as desired, for
     example:

     idea.system.path=~/custom/system
     idea.config.path=~/custom/config

  3. Note that we recommend to store data cache ("system" directory) on a disk
     with at least 1GB of free space.


Enjoy!

-IntelliJ IDEA Development Team

然后cd到 ~/.IntelliJIdea2019.3/config 目錄下,調整idea64.vmoptions的-Xms(最小堆內存:一般設置為256m)與-Xmx(最大堆內存,一般設置為512m)的值即可

最終問題解決

  


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM