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.

can't recognize JAVA_HOME while its value was set

See original GitHub issue

I have this error message:

JAVA_HOME or PATH environment variable seems to point to a JRE. A JDK is required, hence Boot Hints are unavailable.

notice that I have set these settings in vs code settings.json

{
...
    "java.home": "/usr/lib/jvm/java-12-openjdk",
    "spring-boot.ls.java.home": "/usr/lib/jvm/java-12-openjdk",
...
}
[MohamedAmin@samet ~]$ printenv JAVA_HOME
/usr/lib/jvm/java-12-openjdk
[MohamedAmin@samet ~]$ tree /usr/lib/jvm/java-12-openjdk -L 1
/usr/lib/jvm/java-12-openjdk
├── bin
├── conf -> /etc/java/java-12-openjdk/java-12-openjdk-12.0.2.9-1.rolling.fc30.x86_64/conf
├── include
├── legal
├── lib
├── release
└── tapset

6 directories, 1 file

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

5reactions
Samet-MohamedAmincommented, Aug 23, 2019

I have installed java-12-openjdk-jmods and now the problem seems to be solved. I should had done this from the first time.

Thank you @martinlippert and @kdvolder for your feedback.

1reaction
kdvoldercommented, Aug 23, 2019

Thanks for letting us know and I’m glad you found a solution.

Read more comments on GitHub >

github_iconTop Results From Across the Web

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 >
ERROR: JAVA_HOME is not set and no 'java' command could ...
You have to set the JAVA_HOME Environment Variable. On Windows, I solved the issue as follows: Download the Java JDK from here and...
Read more >
Setting the JAVA_HOME Variable in Windows
Set the JAVA_HOME Variable​​ Click the Environment Variables button. Under System Variables, click New. In the Variable Value field, enter your JDK or...
Read more >
How to set the JAVA_HOME environment variable?
Determine the correct value for JAVA_HOME . It should point to the directory containing a bin/java executable. As the user who will use...
Read more >
How to Find JAVA_HOME - Baeldung
If JAVA_HOME is defined in our environment, then the above command will print it out. Or to show the location of the java...
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