Mac安装VisualVM 2.2启动闪退

VisualVM 2.2 在 Mac 上的安装配置步骤如下:

  • 下载 VisualVM
    从官网(https://visualvm.github.io/download.html)下载最新版本(截至 2025 年 10 月,最新版本为2.2)。

  • 双击安装后,点击启动闪退,报错信息如下:

    /Applications/VisualVM.app/Contents/MacOS/visualvm ; exit;
    rcm@rcmdeMacBook-Pro ~ % /Applications/VisualVM.app/Contents/MacOS/visualvm ; exit;
    The operation couldn't be completed. Unable to locate a Java Runtime.
    Please visit http://www.java.com for information on installing Java.

    Cannot find java. Please use the --jdkhome switch.

    Saving session...
    ...copying shared history...
    ...saving history...truncating history files...
    ...completed.

  • 解决方案:修改 JDK 路径

打开应用内的 visualvm.conf 配置文件(路径:/Applications/VisualVM.app/Contents/Resources/visualvm/etc/),在文件末尾添加以下内容:
visualvm_jdkhome="/opt/homebrew/opt/openjdk@21/libexec/openjdk.jdk/Contents/Home"(更换为你自己的java_home)

相关推荐
行思理18 小时前
Dockerfile 各指令说明
运维·macos·docker·容器·php
鸠摩智首席音效师1 天前
如何在 macOS 中清理 Homebrew 软件包 ?
macos
skywalk81631 天前
windows装wsl ubuntu24.04 ,里面装qemu ,然后装mac os (windows也可以直接qemu安装macos)(未实践)
windows·ubuntu·macos·qemu
mixboot1 天前
macOS 部署安装 IndexTTS2
macos·indextts2
2501_915921431 天前
iOS 26 描述文件管理与开发环境配置 多工具协作的实战指南
android·macos·ios·小程序·uni-app·cocoa·iphone
2501_938782091 天前
从实例到单例:Objective-C 单例类的线程安全实现方案
开发语言·macos·objective-c
2501_916007471 天前
免费iOS加固方案指南
android·macos·ios·小程序·uni-app·cocoa·iphone
___波子 Pro Max.2 天前
macOS安装使用Oh My Tmux教程
macos
2501_916008892 天前
iOS 26 文件导出与数据分析,多工具组合下的开发者实践指南
android·macos·ios·小程序·uni-app·cocoa·iphone