flathub / flathub/com.visualstudio.code

JDK 11+ Language Server cannot find PATH

Đang mở
#284 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Shell
Star
217
Fork
82
Merge trung bình
1 ngày 7 giờ
Pull request đã merge (30 ngày)
1

Mô tả

Hi everyone,

So I downloaded a JDK package for Java development, set the JAVA_HOME path for it in the bottom of the .bashrc file like so:

JAVA_HOME = /usr/lib/sdk/openjdk11/jvm/openjdk-11
export JAVA_HOME
export PATH=$PATH:$JAVA_HOME

I then went into VSCODE and set the path inside the settings.json file like so:

"java.configuration.runtimes": [
{
"name": "JavaSE-11",
"path": "/usr/lib/sdk/openjdk11/jvm/openjdk-11",
"default": true
},
{
"name": "JavaSE-17",
"path": "/usr/lib/jvm/java-17-oracle",

},
],

"java.jdt.ls.java.home": "/usr/lib/sdk/openjdk11/jvm/openjdk-11",

However, VSCODE throws an error and says "The java.home variable defined in Visual Studio Code settings points to a missing or inaccessible folder (/usr/lib/sdk/openjdk11/jvm/openjdk-11)" even though that is the correct path. It does not work with java-17 either, and I downloaded the files from oracle themselves.

I think this is an issue only for the flathub version of VSCODE, because other forums says that the one from snap works fine.

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.