LoginSignup
4
6

More than 3 years have passed since last update.

Ubuntu20.04にIntelliJ IDEA2019.3をインストールし、日本語化してみた

Last updated at Posted at 2019-03-25

はじめに

2019.3以前と2020.1以降はconfigファイルのディレクトリが変わるため別記事に記載しました。
https://qiita.com/maccadoo/items/a4acfdcd94c47104b02c

前回、Ubuntu18.04にAndroid Studioをインストールして使っていたが、Kotlinをもう少し勉強したいと思いIntelliJに乗り換えを検討していた。しかし、IntelliJ2018.3にはNavigation Drawerが実装されていなかったため、躊躇していたが2019.1には実装されたため、乗り換えを実施しました。
ちなみにAndroid Studioの場合は以下を参照
https://qiita.com/maccadoo/items/4ce153af005df3f48e8d

執筆時のバージョンは以下の通りです。
Ultimateも手順は同じです。

Soft Ver
Ubuntu 20.04で確認
IntelliJ IDEA Ultimate2019.3で確認

Ubuntu日本語化

Ubuntu20.04.1になり、特に日本語周りで不具合はなさそうですが、不具合が出た方はAndroid Studioの記事を参考にubuntu-defaults-jaをインストールしてください。

GNOMEアプリが文字化けも以下のコマンドでパッケージをアップデートすると修正されます。

sudo snap refresh

IntelliJ IDEAインストール前準備

AVDを有効にするためにはKVMが必要とのことでインストールと権限付与を行う。ついでにadbとJDKもインストールする。JDKはLTS版のみでOKだよね。7や9,10,12を入れたい場合は標準のレポジトリには入っていないので一手間かかります。openjdk-11-jdkの中身は実は10なんですが、そのうち11に差し替わる予定とのこと。

sudo apt -y install qemu-kvm adb openjdk-8-jdk openjdk-11-jdk default-jdk 
sudo gpasswd -a "${USER}" kvm
reboot

IntelliJ IDEAのインストール

2019.3以前と2020.1以降はconfigファイルのディレクトリが変わるため、インストールするバージョンを2019.3に固定する
無料版のCommunity2019.3

sudo snap install intellij-idea-community --channel=2019.3/stable --classic



学生の方はEducational2019.3

sudo snap install intellij-idea-educational --channel=2019.3/stable --classic



有料版をご購入の方はUltimate2019.3

sudo snap install intellij-idea-ultimate --channel=2019.3/stable --classic

IntelliJ IDEAの日本語化

Android Studioのように初回起動前に日本語化してしまうと、初回起動時にウィザードがでなくなるため注意が必要です

無料版のCommunity2019.3

wget http://ftp.jaist.ac.jp/pub/mergedoc/pleiades/build/stable/pleiades.zip
unzip pleiades.zip -d pleiades/
mkdir -p ~/.IdeaIC2019.3/config/
cp -r pleiades/plugins/jp.sourceforge.mergedoc.pleiades/ ~/.IdeaIC2019.3/config/
ls -dF ~/.IdeaIC2019.3/config/jp.sourceforge.mergedoc.pleiades/pleiades.jar | xargs -I {} sed -e '$a \\n-Xverify:none\n-javaagent:{}' /snap/intellij-idea-community/current/bin/idea64.vmoptions > ~/.IdeaIC2019.3/config/idea64.vmoptions
rm pleiades.zip
rm -r pleiades/



学生の方はEducational2019.3

wget http://ftp.jaist.ac.jp/pub/mergedoc/pleiades/build/stable/pleiades.zip
unzip pleiades.zip -d pleiades/
mkdir -p ~/.IdeaIE2019.3/config/
cp -r pleiades/plugins/jp.sourceforge.mergedoc.pleiades/ ~/.IdeaIE2019.3/config/
ls -dF ~/.IdeaIE2019.3/config/jp.sourceforge.mergedoc.pleiades/pleiades.jar | xargs -I {} sed -e '$a \\n-Xverify:none\n-javaagent:{}' /snap/intellij-idea-educational/current/bin/idea64.vmoptions > ~/.IdeaIE2019.3/config/idea64.vmoptions
rm pleiades.zip
rm -r pleiades/



有料版をご購入の方はUltimate2019.3

wget http://ftp.jaist.ac.jp/pub/mergedoc/pleiades/build/stable/pleiades.zip
unzip pleiades.zip -d pleiades/
mkdir -p ~/.IntelliJIdea2019.3/config/
cp -r pleiades/plugins/jp.sourceforge.mergedoc.pleiades/ ~/.IntelliJIdea2019.3/config/
ls -dF ~/.IntelliJIdea2019.3/config/jp.sourceforge.mergedoc.pleiades/pleiades.jar | xargs -I {} sed -e '$a \\n-Xverify:none\n-javaagent:{}' /snap/intellij-idea-ultimate/current/bin/idea64.vmoptions > ~/.IntelliJIdea2019.3/config/idea64.vmoptions
rm pleiades.zip
rm -r pleiades/

フォント

Android StudioのようにCJKフォントではないため、嬉しい
Screenshot from 2019-03-26 00-01-29.png

JVMの設定

「ファイル(F)」 > 「設定(T)... Ctrl+Alt+S」出てくるウィンドでGradle JVMで使用するJDKを選択します。プロジェクト毎に使い分けたい場合は、プロジェクトJDKを使用を選択します。
Java8やJava11に決め打ちしたい場合は、希望のバージョンを設定します。
Androidはjava8がデフォなので、ここで「Java8」を選ぶか、「プロジェクトJDK」を選択した後以下のプロジェクト毎の設定でJava8を選びます。

プロジェクトJDKの設定

「ファイル(F)」 > 「プロジェクト構造... Ctrl+Alt+Shift+S」出てくるウィンドでプロジェクト設定>プロジェクトでJava8を選びます。なければ新規で/usr/lib/jvm/java-8-openjdk-amd64を選択します。
他のKotlinやJavaをビルドするためにjava-11も設定しておくとベターです。

おまけ

Android Studioで書いた英語版に戻す技と、リンクが消滅したように見える現象は健在です。
https://qiita.com/maccadoo/items/4ce153af005df3f48e8d

4
6
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
6