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)

相关推荐
aosky2 天前
手机远程畅玩OpenAI Codex
macos·智能手机·cocoa
A懿轩A2 天前
【2026 最新】Python 下载与安装:在 macOS 下使用 Homebrew 和 pyenv 完美管理多版本 Python
python·macos·mac
IKaros_α‌2 天前
mac上安装openclaw从入门到删除
macos
x-cmd2 天前
macOS 内存模型深度解析 | x free 设计哲学
linux·macos·内存·策略模式·free·x-cmd
itinymeng2 天前
在 macOS 上遇到 brew: command not found 错误,通常是因为 ‌Homebrew 未安装‌ 或 ‌PATH 环境变量未正确配置‌
macos
oscar9992 天前
Claude Code 的“计算机使用”功能:让命令行助手真正操控macOS桌面
macos·claude code·computer
老兵发新帖3 天前
软件开发国内常用镜像源配置及回退方法(MAC版)
macos·软件工程
qq_411262423 天前
ESP32-C5 软件配置MAC 地址
macos
鸠摩智首席音效师3 天前
如何在 MacOS 上安装 PostgreSQL ?
数据库·macos·postgresql
花千树-0103 天前
IndexTTS2 在 macOS 性能最佳设置(M1/M2/M3/M4 全适用)
人工智能·深度学习·macos·ai·语音识别·ai编程