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 find Java 1.8 #112
Comments
Thanks for the report! Please verify that using the "--jdkhome" parameter works for you - see the First Steps section at the bottom of http://visualvm.github.io/download.html. |
Using |
If you want to select particular JDK permanently, you can add path to JDK to |
Why doesn't VisualVM just use the the |
Based on the initial report, I downloaded JDK 11 installer for Windows and JDK 8 installer for Windows from https://github.com/ojdkbuild/ojdkbuild . I installed both JDKs on WIndows 10. I downloaded VisualVM 1.4.4, unzipped it and VisualVM started just fine. There was no complain about missing Java 1.8. |
The problem appears to have come back, I am using adoptopenjdk 11. even if I use --jdkhome, it still can't find it, even with Visual VM2 on Windows 10. EDIT: Nevermind, solved problem, by using '/' for system paths instead of '' on Windows, then --jdkhome recognized adoptopenjdk 11, thanks. |
Do you mean you had to use |
Yes that. |
Tested on a fresh Windows 10 installation, VisualVM 2.0 and AdoptOpenJDK 11.0.6. Using the Windows installer, default settings, the JDK is installed to Running Running The correct way to run VisualVM on Windows using the AdoptOpenJDK11 installed with the default settings is I don't see any bug here, works exactly as designed and expected. |
fyi. eg.) Use
|
Yup, that was the problem I had. |
Hello, Just one more datapoint. Using Win10, installed via Scoop (MCOfficer's bucket), which basically downloads the archive and decompresses it. And having an AdoptJdk14 hotspot installed (again just put somewhere) and using --jdkhome does not work. But editing the JDKhome config seteting in etc/visualvm.conf works. |
Using --jdkhome or editing etc/visualvm.conf should have the same effect. Can you please share your command to start VisualVM using the --jdkhome switch and the working visualvm.conf file? |
Thanks for the quick response! Now I cannot reproduce it :o --jdkhome works. (Reverted to original .conf file and copied the path to JDK directly into powershell console and visualVM started.) Interestingly if I supply a wrong path I get the confirmation dialog asking me whether I'd like to try the default. (And then I get the error popup.) Hm, looking back at the console log, it seems I mistyped jdkhome before :( Sorry for the false alarm! |
I just downloaded and unzipped the 2.0.1
When I execute I can execute in peace the following commands and appears their respective results:
I am working with OpenJDK 11 Well, according with the official documentation Download indicates:
And Getting Started (referred just above in its point 3) indicates:
Therefore: Bug
Solution Two ways One: through the command parameter:
From above, is mandatory use Therefore - for example:
Two: in the
From above, is mandatory use I hope it helps for all developers arriving to this thread. |
Another data point: I have various flavours of JDK 8, 11 and 15 installed on macOS 10.15.6:
I have
When I try to run When I explicitly pass
I would expect VisualVM to default to using |
VisualVM requires the JRE. |
No, VisualVM requires JDK, not JRE. |
If you have
and make a shortcut if you want launch VisualVM by double-clicking it. |
`::visualvm.bat under bin %~d0 cd %~dp0 visualvm.exe --jdkhome "%JAVA_HOME%" pause ` |
This solution worked greatly |
Got the same error and just used the "--jdkhome" parameter in this way: |
You may or may not need to surround your JAVA_HOME env. variable with double quotes as: |
|
I confirm that trailing backslash produces the problem. Can someone please fix that? Thanks! :-) |
As a workaround for the trailing backslash problem, the following .bat file works for me: @echo off
REM Remove the trailing backslash from JAVA_HOME (if it exists)
if "%JAVA_HOME:~-1%"=="\" (
set JAVA_HOME=%JAVA_HOME:~0,-1%
)
visualvm.exe --jdkhome "%JAVA_HOME%" |
Could you consider changing the design? What is the rationale? Why does the launcher read JavaSoft registry and not JAVA_HOME? |
--jdkhome worked for me.
|
Launcher was changed to also use JAVA_HOME and JDK_HOME environment variables to find JDK. This hopefuly improves the situation on Windows platform. |
Describe the bug
Application cannot find Java 1.8 or higher. But Java 1.8 and Java 10 are installed on the computer. JAVA_HOME env. variable is set to the right value too.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Application running.
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: