Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The java.jdt.ls.java.home variable defined in VSCodium settings points to a missing or inaccessible folder #3914

Closed
B1naryB0t opened this issue Jan 12, 2025 · 1 comment

Comments

@B1naryB0t
Copy link

New installation for a university class I'm in, trying to set it up and dealing with config issues.

OS: Debian 12 Stable
Installation: VSCodium flatpak

Error: The java.jdt.ls.java.home variable defined in VSCodium settings points to a missing or inaccessible folder (The java.jdt.ls.java.home variable defined in VSCodium settings points to a missing or inaccessible folder (/usr/lib/jvm/java-17-openjdk-amd64/)

Settings.json:
"java.jdt.ls.java.home": "/usr/lib/jvm/java-17-openjdk-amd64/",
"java.configuration.runtimes": [
{
"name": "JavaSE-21",
"path": "/usr/lib/jvm/zulu21-ca-amd64/",
},
{
"name": "JavaSE-17",
"path": "/usr/lib/jvm/java-17-openjdk-amd64/",
"default": true
},

Error happens whenever I try to open a java project.

@B1naryB0t
Copy link
Author

I worked through it enough to solve my purposes. The issue was flatpak not able to access the path.
Fix:
flatpak install org.freedesktop.Sdk.Extension.openjdk17

Settings.json:
"java.jdt.ls.java.home": "/usr/lib/sdk/openjdk17/",
// "java.configuration.runtimes": [
// {
// "name": "JavaSE-17",
// "path": "/usr/lib/sdk/openjdk17/",
// "default": true
// },
// ],
Commenting out the runtimes was important because I was tired of fussing with flatpak and this way it just defaults to java.jdt.ls.java.home for the runtime. If I had multiple JREs I would dig further but since I just need the one it's good enough for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant