Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot locate java installation in specified jdkhome #588

Open
hpavon opened this issue Jul 9, 2024 · 1 comment
Open

Cannot locate java installation in specified jdkhome #588

hpavon opened this issue Jul 9, 2024 · 1 comment
Labels

Comments

@hpavon
Copy link

hpavon commented Jul 9, 2024

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]
@hpavon hpavon added the bug label Jul 9, 2024
@thurka
Copy link
Member

thurka commented Jul 9, 2024

Try this:

visualvm.exe --jdkhome "C:\Program Files (x86)\Eclipse Adoptium\jdk-8.0.362.9-hotspot"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants