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.

Error trying to find JVM: Unexpected output from `java -XshowSettings:properties`. Didn't find all expected properties: java.version,java.home

See original GitHub issue

I get the following error: Error trying to find JVM: Unexpected output from java -XshowSettings:properties. Didn’t find all expected properties: java.version,java.home

I suspect this is because in my env var I have set JAVA_HOME to JDK 6. Unfortunately I won’t be able to change that. I do have JDK 8 installed which is referenced through java.home VSCode settings for/by another plugin. Can you please add similar or reuse same setting to support configurable JDK?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
spring-projects-issuescommented, May 3, 2018

(comment in Pivotal Tracker added by Kris De Volder:)

The new configuration key is called spring-boot.ls.java.home. I’ve also reorganized a bit so that the existing key for configuring jvm heap size is now called spring-boot.ls.java.heap.

I’ve also made similar changes in the other language servers for concourse, bosh and cloudfoundry-manfiest. They have keys called:

  • concourse.ls.java.home
  • concourse.ls.java.heap
  • bosh.ls.java.home
  • bosh.ls.java.heap
  • cloudfoundry-manifest.ls.java.home
  • cloudfoundry-manifest.ls.java.heap

All language server vscode launching code is shared and uses the same logic. The only difference is the name of the first part of the configuration key.

1reaction
kdvoldercommented, Apr 23, 2018

Can you please add similar or reuse same setting to support configurable JDK?

I think we were already planning on doing that but didn’t feel like this was urgent/critical. But it sounds like we should prioritize that.

I suspect this is because in my env var I have set JAVA_HOME to JDK 6. Unfortunately I won’t be able to change that.

Maybe you can. It might be possible to change the JAVA_HOME env var only for the vscode or STS process without changing the global env var setting used system wide.

I’m not sure this will work for you, as I’m not sure exactly why you need it be a JDK6. But you could just set the env var when launching vscode. For example on Linux I could so something like this when launching vscode from a CLI terminal.

JAVA_HOME=/opt/alternate/javahome code

This will set JAVA_HOME only for that one time, launching vscode process.

To avoid having to do it everytime you launch vscode you could also create a shell script and put the launch command with env var setting in there.

So maybe that could be a workaround for you until we add a proper vscode setting.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Java properties command shows unassigned JRE_HOME for ...
This does outputs a wealth of information on my console, but there is this %JRE_HOME%\bin sitting on one line, which means that it...
Read more >
The java Command - Oracle Help Center
Validates all modules and exit. This option is helpful for finding conflicts and other errors with modules on the module path. -D property...
Read more >
JIRA Software should detect the Java version correctly
When trying to launch JIRA Software 7, the version detection is unable to detect our Java version correctly and stops booting. The error...
Read more >
Ambari Setup - JAVA HOME Error - Cloudera Community
Your java.home set inside the ambari.properties is incorrect. It is pointing to the "java" file instead of pointing to the directory where the...
Read more >
man page java section 1 - manpagez
DESCRIPTION. The java command starts a Java application. It does this by starting the Java Virtual Machine (JVM), loading the specified class, and...
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