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

VisualVM does not start if JRE is inside JDK folder (/jre) #540

Open
SDXC opened this issue Dec 19, 2023 · 0 comments
Open

VisualVM does not start if JRE is inside JDK folder (/jre) #540

SDXC opened this issue Dec 19, 2023 · 0 comments
Labels

Comments

@SDXC
Copy link

SDXC commented Dec 19, 2023

Describe the bug
We have some use-cases where we install JRE along JDK (mainly to minimize the usage of JDK where it is not needed). We do, however, bundle JRE inside the JDK folder (same version) so it's a bit easier to maintain and looks more clean. This has been a proven and so far stable installation method and only with VisualVM we have an issue in this case upon startup.

When trying to start VisualVM the following error occurs:
"You are running VisualVM using Java Runtime Environment (JRE)."
Also showing the "Location" pointing to the /jre folder inside our JDK.

It looks like the implemented runtime check automatically assumes that an existing /jre folder means we're using JRE.
We use the parameter --jdkhome "%JDK_HOME%" (without trailing ).

To Reproduce
Steps to reproduce the behavior:

  1. Put a JRE inside the JAVA_HOME folder and rename it to "jre"
  2. Start VisualVM with --jdkhome "%JDK_HOME%" or --jdkhome "%JAVA_HOME%"
  3. The error occurs.
  4. Remove the jre folder and try again. It works now.

Expected behavior
It is nice to have a check for JRE if you're actually using the wrong package. But it should also take into account what's actually in the bin folder and not what "might" be in the jre folder. As we're exactly pointing to the --jdkhome any unnecessary subfolders should be ignored.

VisualVM log
N/A

Screenshots
grafik

Desktop (please complete the following information):

  • OS: MS WinSrv2022
  • JDK: 11.0.21+9
  • Version: 2.1.7
@SDXC SDXC added the bug label Dec 19, 2023
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

1 participant