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?

More than 3 years have passed since last update.

Javaの開発環境を整理する(Mac+VScode)

Posted at

しばらく個人PCを触ってなかったので更新します。

やりたいこと

・Javaのインストール
・VScodeのインストール
・SpringBootのサンプルPJを動かす

使ってる機器はMacBook Air (M1, 2020)です

Javaのインストール

最近のJDKはいくつか選択肢があり以下の記事が大変参考になります
https://qiita.com/gishi_yama/items/ee3526e7e7a922148333

JDK17を使いたかったので以下の17をインストールする
https://aws.amazon.com/jp/corretto/

kaikusakari@kais-MacBook-Air ~ % java -version
openjdk version "17.0.3" 2022-04-19 LTS
OpenJDK Runtime Environment Corretto-17.0.3.6.1 (build 17.0.3+6-LTS)
OpenJDK 64-Bit Server VM Corretto-17.0.3.6.1 (build 17.0.3+6-LTS, mixed mode, sharing)
kaikusakari@kais-MacBook-Air ~ % 

VScodeのインストール

https://code.visualstudio.com/
最新の安定板1.68をインストールした

VScodeのjavahomeの設定(json)
{
    "json.schemas": [
    {
        "fileMatch": [
            "/myfile"
        ],
        "url": "schemaURL"
    }
    ],
    "code-runner.clearPreviousOutput": true,
    "code-runner.runInTerminal": true,
    "files.exclude": {
        "**/.classpath": true,
        "**/.project": true,
        "**/.settings": true,
        "**/.factorypath": true
    },
    "editor.suggestSelection": "first",
    "vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
    "java.jdt.ls.java.home":"/Library/Java/JavaVirtualMachines/amazon-corretto-17.jdk/Contents/Home/",
    "java.debug.settings.exceptionBreakpoint.skipClasses": [
    
    ],
    "spring-boot.ls.java.home": "",
}

Gradle Language Support
Gradle for Java

サンプルを動かす

以下をデプロイする
https://spring.pleiades.io/guides/gs/spring-boot/
https://github.com/spring-guides/gs-spring-boot

いけました
image.png

JDKやVSCodeを最新のバージョンに更新しました。実際に開発を進める上での準備はできましたので今後は検証環境の構築を進めていきます。PC上にLinuxのVMを起動してDockerで動かしながら検証を進めていきたい。

並列してTypeScriptフロントエンドの知識の棚卸も進めていってますが、まずはサーバーサイド側の知識を整理します。

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?