The start script /usr/bin/visualvm has code which always selects Java 11, when installed. When changing line 80 as follows, it starts properly with Java 21.
- for j in /usr/lib/jvm/java-11-openjdk-$ARCH /usr/lib/jvm/default-java; do + for j in /usr/lib/jvm/default-java; doDefault java points to the following JVM on my machine: java-1.21.0-openjdk-amd64
Hope that helps to reproduce the issue. Best Regards Tobias
OpenPGP_signature.asc
Description: OpenPGP digital signature