question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Fall back to java.jdt.ls.java.home if embedded JRE fails

See original GitHub issue

When deploying VSCode to an AP Computer Science lab where the students don’t have admin privileges, attempts to enable the latest Extension Pack for Java (which includes the “Language Support for Java™ by Red Hat” extension) fail reporting “Couldn’t start client Language Support for Java” whenever they open a Java project.

Environment
  • Operating System: Windows 10
  • JDK version: Various (tried latest Microsoft OpenJDK 11 & 17 as well as those from Adoptium’s Teemurin)
  • Visual Studio Code version: 1.64.0
  • Java extension version: v 1.1.0 through v1.3.0
Steps To Reproduce
  1. Install latest VSCode and JDK (with JAVA_HOME set correctly)
  2. Create a new Java class
Current Result

Reports “Couldn’t start client Language Support for Java” when trying to run or debug the Java code.

Expected Result

Should work like it does for users with admin privileges (or how it did for v1.0.0).

Additional Information

Works fine for users with admin privileges or if we roll the students back to v1.0.0 of this extension. Typing java -version in terminal returns correct OpenJDK version.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:17 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
rgrunbercommented, Jun 2, 2022

Renamed this so at least we can track it. Probably lower priority given a solution exists, but at least we can revisit in the future.

1reaction
snjezacommented, Feb 16, 2022
Read more comments on GitHub >

github_iconTop Results From Across the Web

VS code & java: This setting is deprecated, please use 'java.jdt ...
Absolute path to JDK home folder used to launch the Java Language Server. Requires VS Code restart. However, if your real problem is...
Read more >
Language Support for Java(TM) by Red Hat
The embedded JRE is used to launch the Language Server for Java. ... The path to the Java Development Kit can be specified...
Read more >
VSCode Java (@VSCodeJava) / Twitter
the absolute fastest way to get and setup a fully working java development environment locally.
Read more >
Maven Error “JAVA_HOME should point to a JDK not a JRE”
Before running any goals, Maven checks for the existence of the java command in the path specified by JAVA_HOME or by asking the...
Read more >
Fix JAVA_HOME errors | Invalid directory | Not set or defined
To fix this issue, see if you have both a JRE and JDK installed locally. If you do, ensure that the JAVA_HOME variable...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found