7/31/2024 - I have been using SDKMAN on Windows via Git Bash for some time now and truly like it. I did however come across an interesting bug/solution when installing VisualVM however.
Symptom: When starting VisualVM from command line (i.e. > visualvm), there would be some delay as if the script/program were starting but then I would just get the prompt back after a few seconds and the app would never appear.
Research: I assumed the app was starting but failing. After a small amount of web searching, I found the log file in ~/.visualvm/2.1.8/var/log/messages.log. Though it gave the following somewhat specific message (below), the root cause seemed elusive. Eventually, I downloaded the latest (2.1.9) VisualVM .zip file manually from the actual web site and followed the installation instructions which are simply to unzip the file and then run 'visualvm.exe'. This worked but should be noted that it DID start with an "Accept License" dialog that is noted in their troubleshooting guide AND implied by the error message.
WARNING [org.netbeans.core.startup.Main]java.lang.NoClassDefFoundError: org.graalvm.visualvm.modules.startup.AcceptLicense starting from org.netbeans.MainImpl$BootClassLoader@404b9385 with possible defining loaders null and declared parents ]
Solution: It may be somewhat unconventional and maybe not "guaranteed" in all situations but I eventually just tried copying the 'visualvm.exe' from 2.1.9 into the /bin of version 2.1.8 (installed by sdkman). This seemed to work and I could now start from git bash via > visualvm.exe
However... for simplicity sake, I don't like having to remember to add the '.exe' at the git bash command line. So, what I did was rename the original script ( 'visualvm' ) to something like 'visualvm_original'. Then, I created a new script as shown below. This worked.
new script: visualvm