flathub / flathub/com.visualstudio.code
JDK 11+ Language Server cannot find PATH
- Lingua principale
- Shell
- Stelle
- 217
- Fork
- 82
- Merge medio
- 1g 7h
- PR unite (30g)
- 1
Descrizione
Hi everyone,
So I downloaded a JDK package for Java development, set the JAVA_HOME path for it in the bottom of the .bashrc file like so:
JAVA_HOME = /usr/lib/sdk/openjdk11/jvm/openjdk-11
export JAVA_HOME
export PATH=$PATH:$JAVA_HOME
I then went into VSCODE and set the path inside the settings.json file like so:
"java.configuration.runtimes": [
{
"name": "JavaSE-11",
"path": "/usr/lib/sdk/openjdk11/jvm/openjdk-11",
"default": true
},
{
"name": "JavaSE-17",
"path": "/usr/lib/jvm/java-17-oracle",
},
],
"java.jdt.ls.java.home": "/usr/lib/sdk/openjdk11/jvm/openjdk-11",
However, VSCODE throws an error and says "The java.home variable defined in Visual Studio Code settings points to a missing or inaccessible folder (/usr/lib/sdk/openjdk11/jvm/openjdk-11)" even though that is the correct path. It does not work with java-17 either, and I downloaded the files from oracle themselves.
I think this is an issue only for the flathub version of VSCODE, because other forums says that the one from snap works fine.
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Direzione di ricerca
Start by reproducing the missing-or-inaccessible-folder error in the Flathub VS Code package using the paths from settings.json and the JAVA_HOME/PATH entries in .bashrc. Inspect how the packaged application accesses those JDK directories and compare the Java 11 and Java 17 configurations. Done means the Java language server accepts a valid configured JDK path in the Flathub build.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- java, shell, vscode
- Ambito
- desktop, devtools
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100