redhat-developer / redhat-developer/vscode-java
java.home Path Cannot be Relative
Nessuno ha ancora preso questa issue.
- Lingua principale
- TypeScript
- Stelle
- 2.3k
- Fork
- 546
- Merge medio
- 20h 1m
- PR unite (30g)
- 11
Descrizione
I need to be able to use a relative path when specifying my jdk because I am making a USB version of visual studio that can be used on any computer. If that USB is in the E: (or any other) drive instead of the regular D: we’d have to manually change the path. The python module was able to use a combination of “..\..\” (Example below) to navigate to the relative location of python.exe. Is there a way to do this for the java.home variable, or an extension that adds this functionality?
In Settings.json:
"java.home": "..\..\..\..\..\..\Java12\jdk-12.0.2", //Doesn’t work
"python.pythonPath": "..\..\..\..\..\..\Python\python.exe", //Works
Environment
- Operating System: Windows
- JDK version: 12.0.2
- Visual Studio Code version: 1.38.1
- Java extension version: Redhat: 0.49.0; Java Extension Pack: 0.8.0
Steps To Reproduce
- Download VS Code Windows ZIP archive into a USB disk
- Enable the VS Code portable mode (creating “data” folder) https://code.visualstudio.com/docs/editor/portable
- Download the JDK binary into the USB disk
- Open the VS Code and install the Java Pack extension, the extensions should appear in the data folder
- Try and set Java.home to a relative location to VS Code, however it will never find the jdk unless you specify the entire path
Current Result
It cannot find the jdk without the entire path.
Expected Result
The path should point to the JDK relative to VSCode (or some starting position within vscode)
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 dall'impostazione java.home in Settings.json e confrontane la gestione con quella di python.pythonPath, usando la riproduzione in Windows portable-mode descritta nell'issue. Traccia il modo in cui l'estensione Java risolve il percorso del JDK e chiarisci la posizione di base prevista per i percorsi relativi; il lavoro è completato quando la struttura USB funziona da diverse lettere di unità senza un percorso assoluto.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- java, typescript, vscode
- Ambito
- developer-experience, tooling
- Tipo di issue
- Funzionalità
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 32/100