Ubuntu 22.04(WSL) に IntelliJ IDEA をインストール

概要

Ubuntu22.04環境における、IntelliJ IDEAのインストール、起動方法についてです。

Toolbox App について

一般的には JetBrains Toolbox App を使用して IntelliJ IDEA をインストールするのが好ましいとされていますが、調査した限り、Ubuntu 20.04 の WSL環境で起動できなかったという情報があり、2023年6月時点でも問題があるということでしたので、こちらは使わないこととします。

https://youtrack.jetbrains.com/issue/TBX-8755/

インストール

下記よりCommunity Edition用のファイルをダウンロードします。

Download IntelliJ IDEA – The Leading Java and Kotlin IDE
Download the latest version of IntelliJ IDEA for Windows, macOS or Linux.

2023.8.12時点でのファイル名は ideaIC-2023.2.tar.gz でした。

これを展開します。

$ tar xvfz ideaIC-2023.2.tar.gz

/binディレクトリ以下の idea.sh を実行します。

$ cd idea-IC-232.8660.185/bin
$ ./idea.sh &

CompileCommand: exclude com/intellij/openapi/vfs/impl/FilePartNodeRoot.trieDescend bool exclude = true
Aug 12, 2023 10:35:34 PM java.util.prefs.FileSystemPreferences$1 run
INFO: Created user preferences directory.
2023-08-12 22:37:45,103 [ 131053]   WARN - java.util.prefs - Prefs file removed in background /home/wurly/.java/.userPrefs/prefs.xml
2023-08-12 22:37:45,188 [ 131138]   WARN - #c.i.c.ComponentStoreImpl - Duplicated scheme Light - old: Light, new Light
2023-08-12 22:37:45,231 [ 131181]   WARN - #c.i.u.i.IndexId - IndexId name[com.android.tools.idea.model.AndroidManifestIndex$Companion$NAME$1.NAME] should match [[A-Za-z0-9_.\-]+]. Names with unsafe characters could cause issues on some platforms. This warning likely will be escalated to an error in the following releases.
2023-08-12 22:37:45,557 [ 131507]   WARN - #c.i.u.i.IndexId - IndexId name[shared.index.hashes.com.android.tools.idea.model.AndroidManifestIndex$Companion$NAME$1.NAME] should match [[A-Za-z0-9_.\-]+]. Names with unsafe characters could cause issues on some platforms. This warning likely will be escalated to an error in the following releases.

Agreement を確認します。

587_02.jpg

データの共有について選択します。

587_03.jpg

起動画面が表示されます。

587_04.jpg

その他の設定

私の環境では、~/IdeaIC/ にファイルを格納し、~/.bash_aliases に下記のように記述しました。

alias idea='/home/wurly/IdeaIC/idea-IC-232.8660.185/bin/idea.sh'
Copied title and URL