microsoft / microsoft/vscode-java-debug
Wrong Java runtime used JRE 11 vs. JRE 17
オープン
まだ誰も着手していません。
ai-triaged
bug
- 主要言語
- TypeScript
- スター
- 591
- フォーク
- 429
- 平均マージ
- 1日 9時間
- マージ済み PR(30日)
- 19
説明
Wrong Java runtime used
Environment
- Operating System: ubuntu linux
- JDK version: Corretto-17.0.9.8.1
- Visual Studio Code version: latest
- Java extension version: latest and prerelease
- Java Debugger extension version: latest and prerealease
Steps To Reproduce
- Trying to debug spring boot
No special launch.json
{
"version": "0.2.0",
"configurations": [
{
"type": "java",
"name": "Launch Application",
"request": "launch",
"mainClass": "de.xxx.xxx.Application",
"projectName": "xxx-application",
"env": {
"SPRING_PROFILES_ACTIVE": "debug",
},
"vmArgs": "-Xms128m -Xmx128m"
}
]
}
Java Configure Runtime for Projects outputs wrong java version
Should be 17 (works on other enviroments - E.g. eclipse)
Current Result
Error: Unable to initialize main class de.ewe.gisatfuture.servicehub.Application
Caused by: java.lang.UnsupportedClassVersionError: org/springframework/web/servlet/config/annotation/WebMvcConfigurer has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 55.0
Expected Result
Debugger should simply run
Additional Informations
Workaround: mvn spring-boot:run does work
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、示されている launch.json を使用して Spring Boot のデバッグ起動を再現し、Java Configure Runtime for Projects の出力を確認します。そこで選択されている JRE を、JDK 17 環境およびデバッガーが使用する runtime と比較します。デバッガーが JRE 11 ではなく JDK 17 でアプリケーションを起動すれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- java, spring-boot, vscode
- 領域
- devtools, tooling
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 25/100