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 1 year has passed since last update.

Java25のIO.println()がコンパイルエラーになるのを解決

0
Last updated at Posted at 2025-11-04

問題:Eclipse、Java25でIO.printlnを試してみるもコンパイルエラー、コード補完も働かない

やったこと
1.設定→Java→インストール済みのJREでJava25選択
2.設定→Java→コンパイラー→コンパイラー準拠レベルでJava25選択
3.エディタでSystem.out.println(System.getProperty("java.version"));を出力
4.Javaプロジェクト新規作成時に「実行環境JREの使用」をJava25選択

コンパイルエラーの原因
・Javaプロジェクト作成時のJREを21にしていた。(ので1~3では変わらなかった)

実行環境JREをJava25に指定した新規Javaプロジェクトでは無事にIO.println()が動作しました。

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?