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?

Java Biuld Failed

0
Posted at

javaでSpringを起動しようとしてエラーが発生。
ビルドが失敗していた。

なぜ失敗していたか?

「Java 17 が必須」という Gradle の toolchain 設定 と、PC に入っている JDK のバージョンが合っていなかったことが原因

入っていたJDK
java8とJava22

必要なのはJava17だった

※Gradle は「17 専用の JDK を探す → なければ自動ダウンロード」という動きだが、
17が見つからずダウンロードできなかったことが原因ぽい。

つまり「動かす JDK は 22、出すバイトコードは 17」にしたので、自分の環境JDK 22 でビルドが通るようになった。

java {
	sourceCompatibility = '17'
	targetCompatibility = '17'
}
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?