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?

WSL2環境でAmazon Corretto(Java)をサクッとセットアップ

Last updated at Posted at 2025-06-30

この手順は、組織内プロキシが無いことを前提にしています。

amazon correttoのセットアップ

curl -fsSL https://apt.corretto.aws/corretto.key -o /etc/apt/keyrings/corretto.asc
echo "deb [signed-by=/etc/apt/keyrings/corretto.asc] https://apt.corretto.aws stable main" | tee /etc/apt/sources.list.d/corretto.list

apt-get update
apt-get install -y java-21-amazon-corretto-jdk

maven3.9のセットアップ(オプション)

aptに含まれるmavenはバージョンが古いため、Maven Wrapperを用いる

apt-get install -y maven

# pom.xmlがあるフォルダに移動する
cd /app/example-web
mvn wrapper:wrapper -Dmaven=3.9.11

インストール後は、下記のようにしてMavenを利用する

Mavenを呼び出すコマンドをmvnではなく./mvnwに読み替える必要があります。

./mvnw test

参考文献

(AWS)Install Amazon Corretto 21 on Debian-Based Linux

debian manpages

(Apache)Maven Wrapper

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?