0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

IntelliJの環境構築

Last updated at Posted at 2025-10-02

📚 学習日付

10月02日(木)

🕒 学習時間

11:00~14:10(03:10)

🧑‍💻 実施した学習内容

✅Javaの環境構築
・Java21のインストール公式サイト
https://www.oracle.com/jp/java/technologies/downloads/
・macOSのJava21のOracleJDKのダウンロード
・M4チップ(AppleSilicon)はIntel版と違うため、『Arm64 (AArch64) 対応のJDK』を下記のファイルをダウンロードする(今回はこちらの方でうまくできた)
https://download.oracle.com/java/21/latest/jdk-21_macos-aarch64_bin.dmg
もしくは下記のファイルをダウンロードする
https://download.oracle.com/java/21/latest/jdk-21_macos-x64_bin.dmg
・ターミナルでJavaのバージョンを確認するコマンド

java -version

出力例

java version "21.0.1" 2023-10-17 LTS
Java(TM) SE Runtime Environment (build 21.0.1+12-LTS-1238)
Java HotSpot(TM) 64-Bit Server VM (build 21.0.1+12-LTS-1238, mixed mode, sharing)

✅IntelliJの環境構築
・ToolBoxというアプリを用いて『IntelliJ』をダウンロードします。WindowsかMacかで、インストールするファイルが異なる
https://www.jetbrains.com/ja-jp/toolbox-app/
・ToolBoxを用いてIntelliJをインストール手順
https://pleiades.io/help/idea/installation-guide.html
・『IntelliJ IDEA Communtiy』(無料版)『IntelliJ IDEA Ultimate』(有料版)があるが無料版をインストール

✅IntelliJの動作確認
①IntelliJの『新規プロジェクト』を作成
②『新規プロジェクト』の設定は次の通りにして、作成する。

プロジェクト名:任意のもの
言語:Java
ビルドシステム:Gradle
GradleDSL:Groovy

3BA0149A-F3EA-48B3-9256-A93C290B4343.jpeg

③『Hello』を出力するコードを書いて実行し、『BUILD SUCCESSFUL』が画面下に出れば大丈夫。
6E5AD362-D94F-4F63-AF40-DE322F8485EC.jpeg

✅GoogleStyleのダウンロード先URL
①IntelliJ用のGoogle Java Styleのフォーマッターxmlは以下で公開されています。
https://github.com/google/styleguide/blob/gh-pages/intellij-java-google-style.xml
なので、まずはこれをダウンロードします。
②ダウンロードした「intellij-java-google-style.xml」をIntelliJにImportします。
設定を開き、「Editor」→「Code Style」→「Java」にて、Schemeのところの設定アイコン(右側の歯車)から「Import Scheme」→「IntelliJ IDEA Code Stye XML」を選択し、ダウンロードした「intellij-java-google-style.xml」をImportします。
以上で、IntelliJへの適用は完了です。

💬 次に学習したい事のメモ・感想

JavaとIntelliJの動作確認でのエラーによる対応やGoogleStyleの設定が不安で時間をかけたが、無事起動がうまくいったのでよかった。

0
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?