microsoft / microsoft/vscode-java-debug
Wrong Java runtime used JRE 11 vs. JRE 17
Nessuno ha ancora preso questa issue.
- Lingua principale
- TypeScript
- Stelle
- 591
- Fork
- 429
- Merge medio
- 1g 9h
- PR unite (30g)
- 19
Descrizione
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
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia riproducendo l'avvio di debug di Spring Boot con il launch.json mostrato e ispeziona l'output di Java Configure Runtime for Projects. Confronta il JRE selezionato lì con l'ambiente JDK 17 e il runtime utilizzato dal debugger. Il lavoro è completato quando il debugger avvia l'applicazione con JDK 17 invece di JRE 11.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- java, spring-boot, vscode
- Ambito
- devtools, tooling
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 25/100