`java.jdt.ls.java.home` should use the Java execution environment name
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 35/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Tranquilla
- Stack tecnologico
- java, typescript, vscode
- Ambito
- developer-experience
Direzione di ricerca
Non vengono indicati file di implementazione né test. Inizia dalla gestione di java.jdt.ls.java.home e java.configuration.runtimes, usando l'esempio .vscode/settings.json come punto di ingresso a livello di workspace. Il lavoro è completato quando un progetto può selezionare un runtime in base al nome del suo ambiente di esecuzione, mentre ogni utente risolve quel nome nel proprio percorso JDK.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Description
I've been trying to configure several Java projects in Visual Studio Code and have noticed that the java.jdt.ls.java.home setting, among others, is always required.
This setting belongs in the project's workspace (unless you work in one project, or have a perfectly aligned setup), but it cannot be set as such because for a multi-user project, each one will definitely have a different path for the JDK.
I think it would be great if this setting could take the (reference) value of one the existing Java execution environments instead, and tries to read the path of the corresponding JDK. This way, the configuration is fixed, set at the project level, and only needs to change if the project upgrades to a newer JDK.
For instance:
// Global User Settings
{
...
"java.configuration.runtimes": [
{
"javadoc": "https://docs.oracle.com/en/java/javase/17/docs/api/index.html",
"name": "JavaSE-17",
"path": "/home/x80486/.local/share/mise/installs/java/temurin-17",
"sources": "/home/x80486/.local/share/mise/installs/java/temurin-17/lib/src.zip"
},
{
"default": true,
"javadoc": "https://docs.oracle.com/en/java/javase/21/docs/api/index.html",
"name": "JavaSE-21",
"path": "/home/x80486/.local/share/mise/installs/java/temurin-21",
"sources": "/home/x80486/.local/share/mise/installs/java/temurin-21/lib/src.zip"
}
],
...
}
Then for each project I work on, I could just set in .vscode/settings.json:
{
"java.jdt.ls.java.home": "JavaSE-21"
}
Additional Context
This is just an idea with the existing settings. It may be even more appropriate to define something new that could unify all the settings that request the location of the JDK, but it should always refer in one way or another to the java.configuration.runtimes (preferably by name), otherwise it's impossible to set this correctly —in a way that works for everyone regardless of the architecture and location/installation of the Java SDK—, at the project level.
- Lingua principale
- TypeScript
- Stelle
- 2.3k
- Fork
- 547
- Merge medio
- 20h 1m
- PR unite (30g)
- 11
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.
Altre issue di redhat-developer/vscode-java
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
redhat-developer/vscode-java#4426 ·
-
bug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
redhat-developer/vscode-java#4506 · 3 commenti · 4 reazioni ·
-
bug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
redhat-developer/vscode-java#4505 · 2 commenti · 1 reazione ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 52/100
redhat-developer/vscode-java#4504 · 3 commenti · 1 reazione ·
-
bug
Difficoltà 3/5 1-2 giorni Idoneità per principianti 62/100
redhat-developer/vscode-java#4502 ·
Tutte le issue di redhat-developer/vscode-java
Issue simili
-
Type/Bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
OpenNSW/nsw-srilanka#497 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
0xMiden/bridge-portal#132 ·
-
react-doctor severity:warning tech-debt
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
digidem/comapeo-cloud-app#403 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100