redhat-developer / redhat-developer/vscode-java
java.home Path Cannot be Relative
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- TypeScript
- Estrellas
- 2.3k
- Forks
- 546
- Merge medio
- 20 h 1 min
- PR fusionados (30 d)
- 11
Descripción
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)
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
Comienza con la configuración java.home en Settings.json y compara su tratamiento con python.pythonPath usando la reproducción en Windows portable-mode descrita en el issue. Rastrea cómo la extensión de Java resuelve la ruta del JDK y aclara cuál es la ubicación base prevista para las rutas relativas; se considerará terminado cuando el diseño del USB funcione desde distintas letras de unidad sin una ruta absoluta.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- java, typescript, vscode
- Área
- developer-experience, tooling
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 32/100