redhat-developer / redhat-developer/vscode-java

java.home Path Cannot be Relative

Abierto
#1,070 1 comentario 5 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

enhancement preferences ux
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
  1. Download VS Code Windows ZIP archive into a USB disk
  2. Enable the VS Code portable mode (creating “data” folder) https://code.visualstudio.com/docs/editor/portable
  3. Download the JDK binary into the USB disk
  4. Open the VS Code and install the Java Pack extension, the extensions should appear in the data folder
  5. 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

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. 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

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.