redhat-developer / redhat-developer/vscode-java
java.home Path Cannot be Relative
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- TypeScript
- Star
- 2.3k
- Fork
- 546
- Merge trung bình
- 20 giờ 1 phút
- Pull request đã merge (30 ngày)
- 11
Mô tả
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)
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu với thiết lập java.home trong Settings.json và so sánh cách xử lý thiết lập này với python.pythonPath, sử dụng bản tái hiện trên Windows portable-mode được mô tả trong issue. Theo dõi cách tiện ích mở rộng Java phân giải đường dẫn JDK và làm rõ vị trí cơ sở dự kiến cho các đường dẫn tương đối; công việc được xem là hoàn tất khi bố cục USB hoạt động từ các ký tự ổ đĩa khác nhau mà không cần đường dẫn tuyệt đối.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- java, typescript, vscode
- Lĩnh vực
- developer-experience, tooling
- Loại issue
- Tính năng
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 32/100