Skip to content

Cannot locate java installation in specified jdkhome #588

Closed
@hpavon

Description

@hpavon

Describe the bug
When trying to launch VisualVM on Windows I get the error message "Cannot locate java installation in specified jdkhome"

To Reproduce

  1. Install Eclipse Adoptium jdk-8.0.362.9. No other JDK or JRE installed.
  2. Add C:\Program Files (x86)\Eclipse Adoptium\jdk-8.0.362.9-hotspot\bin to PATH. Set JAVA_HOME to C:\Program Files (x86)\Eclipse Adoptium\jdk-8.0.362.9-hotspot\
  3. VisualVM is unzipped in C:\visualvm_218
  4. Tried to run VisualVM by just double clicking visualvm.exe in C:\visualvm_218\bin -> Error: Cannot find Java 1.8 or higher.
  5. Tried to launch from command line as visualvm.exe --jdkhome %JAVA_HOME%
    Error: Cannot locate java installation in specified jdkhome C:\Program
  6. Tried to launch from command line as visualvm.exe --jdkhome "%JAVA_HOME%"
    Error: Cannot locate java installation in specified jdkhome C:\Program Files (x86)\Eclipse Adoptium\jdk-8.0.362.9-hotspot
  7. Similar result for visualvm.exe --jdkhome "%JAVA_HOME%"bin
  8. Tried changing backslashes for slashes (read somewhere) visualvm.exe -jdkhome "C:/Program Files (x86)/Eclipse Adoptium/jdk-8.0.362.9-hotspot"
    Error: Cannot find Java 1.8 or higher.
  9. Tried to launch from command line as visualvm.exe --jdkhome "%JAVA_HOME%jre"
    Error: You are running VisualVM using Java Runtime Environment
  10. All the previous with or without specifiying --userdir

Screenshots
In case it helps:
image
image
image
image

Expected behavior
VisualVM runs.

Desktop (please complete the following information):

  • OS: Microsoft Windows Server 2019 Datacenter
  • JDK version [OpenJDK 1.8.0_362]
  • VisualVM version [e.g. 2.1.8]

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions