can't recognize JAVA_HOME while its value was set
See original GitHub issueI 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:
- Created 4 years ago
- Comments:6 (4 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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.
Thanks for letting us know and I’m glad you found a solution.