Skip to content

Can't open visualvm with Windows11 + jdk24 #632

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

Closed
cvgaviao opened this issue Mar 21, 2025 · 4 comments
Closed

Can't open visualvm with Windows11 + jdk24 #632

cvgaviao opened this issue Mar 21, 2025 · 4 comments
Labels

Comments

@cvgaviao
Copy link

Describe the bug

Can't open visualvm user interface.

To Reproduce
Steps to reproduce the behavior:

Just click on the launcher or call it via command line

Expected behavior
A clear and concise description of what you expected to happen.

VisualVM log
$ ./visualvm -J-Dorg.graalvm.visualvm.jmx.level=100 -J-Dorg.graalvm.visualvm.jvm.level=100
WARNING: package com.sun.java.swing.plaf.gtk not in java.desktop
WARNING: package sun.awt.X11 not in java.desktop
Error occurred during initialization of VM
java.lang.Error: A command line option has attempted to allow or enable the Security Manager. Enabling a Security Manager is not supported.
at java.lang.System.initPhase3(java.base@24/System.java:1947)

messages.log is available via Help | About | Logfile and
via VisualVM | About VisualVM | Logfile on macOS

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Windows 11
  • JDK version [OpenJDK Runtime Environment ]
  • Version [(build 24+36-3646)]

Additional context
Add any other context about the problem here.

@cvgaviao cvgaviao added the bug label Mar 21, 2025
@thurka
Copy link
Member

thurka commented Mar 21, 2025

VisualVM not yet supports JDK 24. Please run VisualVM on JDK 23 until JDK 24 is supported.

@thurka thurka closed this as completed Mar 21, 2025
@dougxc
Copy link
Member

dougxc commented Mar 25, 2025

How does one specify the JDK used by VisualVM? I'm not having much luck so far:

~/d/g/graal/compiler > java --version
java 21 2023-09-19 LTS
Java(TM) SE Runtime Environment (build 21+35-LTS-2513)
Java HotSpot(TM) 64-Bit Server VM (build 21+35-LTS-2513, mixed mode, sharing)

~/d/g/graal/compiler > echo $JAVA_HOME
/Library/Java/JavaVirtualMachines/jdk-21.jdk/Contents/Home

~/d/g/graal/compiler > /Applications/VisualVM.app/Contents/MacOS/visualvm
WARNING: package com.sun.java.swing.plaf.gtk not in java.desktop
WARNING: package sun.awt.X11 not in java.desktop
Error occurred during initialization of VM
java.lang.Error: A command line option has attempted to allow or enable the Security Manager. Enabling a Security Manager is not supported.
	at java.lang.System.initPhase3(java.base@25-ea/System.java:1947)

@dougxc
Copy link
Member

dougxc commented Mar 25, 2025

The answer is to use --jdkhome:

/Applications/VisualVM.app/Contents/MacOS/visualvm --jdkhome $JAVA_HOME

@thurka
Copy link
Member

thurka commented Mar 26, 2025

FYI: More info about commandline options is available at https://visualvm.github.io/docs/command-line-options.html

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

3 participants