redhat-developer / redhat-developer/vscode-java
Irrelevant "Invalid runtime for JavaSE-21" on start with WSL
まだ誰も着手していません。
- 主要言語
- TypeScript
- スター
- 2.3k
- フォーク
- 546
- 平均マージ
- 20時間 1分
- マージ済み PR(30日)
- 11
説明
Describe the bug
I run vscode with WSL.
Bujt on startup, I get this message:
"Invalid runtime for JavaSE-21: The path points to a missing or inaccessible folder (c:\Program Files\Amazon Corretto\jdk21.0.9_10)."
It should not try a Windows path from WSL Remote. I suspect it either walks over all $PATH entries, or falsely evaluates the Windows side JAVA_HOME.
After closing the message, everything works fine, it correctly uses the JDK in Linux/WSL for everything.
To Reproduce
(Have a valid JDK installed in Windows. I have it in the Windows PATH, and JAVA_HOME set)
Steps to reproduce the behavior:
- Start VSCode on a project residing in WSL
- Wait a few seconds for the message to pop up.
Expected behavior
Not showing that message.
Environment
- Operating System: Windows
- JDK version: 21 (The mistakenly picked up Amazon Corretto on Windows, and either OpenJDK or Corretto within WSL)
- Visual Studio Code version: 1.127.0
- Java extension version: 1.55.0
Additional Information
I tried these things:
- Checking for the path in any configuration (workspace, user, WSL, project)
- deleting ~/.vscode-server completely in WSL
- deleting globalStorage and workspaceStorage in Windows %APPDATA%
- disable "Detect JDK at startup" option, no effect.
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、WSL 経由で開いた VS Code プロジェクトで起動時の警告を再現し、次に Java ランタイムの検出と、リモートコンテキストで Windows PATH または JAVA_HOME がどのように評価されるかを追跡します。Windows JDK が無効として報告されず、有効な WSL JDK が引き続き使用され、警告が表示されなければ完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- java, typescript, vscode
- 領域
- devtools, operating-systems, tooling
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 静か
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 48/100