`java.jdt.ls.java.home` should use the Java execution environment name
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 5/5
- Temps estimé
- Plus d'une semaine
- Accessibilité débutants
- 35/100
- Type d'issue
- Fonctionnalité
- Clarté
- Plutôt claire
- Activité
- Calme
- Stack technique
- java, typescript, vscode
- Domaine
- developer-experience
Piste de recherche
Aucun fichier d’implémentation ni test n’est nommé. Commencez par la gestion de java.jdt.ls.java.home et java.configuration.runtimes, en utilisant l’exemple .vscode/settings.json comme point d’entrée au niveau de l’espace de travail. C’est terminé lorsqu’un projet peut sélectionner un runtime par le nom de son environnement d’exécution, tandis que chaque utilisateur associe ce nom à son propre chemin JDK.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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.
- Langage dominant
- TypeScript
- Étoiles
- 2.3k
- Forks
- 547
- Merge moyen
- 20 h 9 min
- PR mergées (30 j)
- 10
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de redhat-developer/vscode-java
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
redhat-developer/vscode-java#4511 ·
-
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
redhat-developer/vscode-java#4426 ·
-
bug
Difficulté 4/5 3-5 jours Accessibilité débutants 45/100
redhat-developer/vscode-java#4506 · 6 commentaires · 4 réactions ·
-
bug
Difficulté 4/5 3-5 jours Accessibilité débutants 45/100
redhat-developer/vscode-java#4505 · 5 commentaires · 2 réactions ·
-
Difficulté 4/5 3-5 jours Accessibilité débutants 52/100
redhat-developer/vscode-java#4504 · 3 commentaires · 1 réaction ·
Toutes les issues de redhat-developer/vscode-java
Issues similaires
-
Difficulté 2/5 1-3 heures Accessibilité débutants 84/100
bcgov/bc-wallet-mobile#4761 · 1 commentaire ·
-
external-issue to-triage
Difficulté 2/5 1-3 heures Accessibilité débutants 88/100
-
area-deployment area-integrations triage:bot-seen
Difficulté 2/5 Une demi-journée Accessibilité débutants 86/100
-
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
-
refactor
Difficulté 2/5 1-3 heures Accessibilité débutants 84/100