Skip to content

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

Closed

Description

@shankarramr

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?

Activity

  1. kdvolder commented on Apr 23, 2018

    @kdvolder
    Member

    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.

  2. shankarramr commented on Apr 27, 2018

    @shankarramr
    Author

    Hi,
    Thanks for the quick response and update.
    What I meant by 'won't be able to change' is that, primarily my project requires JDK 6 and to that effect there is another VSCode plugin that needs to point to JDK6 which also I believe doesn't have a configurable JDK option.

  3. spring-projects-issues commented on May 3, 2018

    @spring-projects-issues

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

    We decided that we are going to add a specific configuration key for sts4 language server to set java.home. The exact name of the key still to be decided.

    We decided to use our own key rather than try to respond to the key that is used by redhat java language server. That way java home location can be set independently for STS 4 language server. (Since I guess the problem we are trying to address is actually precisely that JAVA_HOME env var is not 'independent enough'. So replacing it with something else that is also not completely independent is probably not a great idea.

  4. spring-projects-issues commented on May 3, 2018

    @spring-projects-issues

    (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.

  5. kdvolder commented on May 3, 2018

    @kdvolder
    Member
  6. added this to the 4.0.0.M11 milestone on May 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions