jvisualvm去哪儿了? [英] Where did jvisualvm go?
问题描述
我正在运行Mac OSX Snow Leopard。
I am running Mac OSX Snow Leopard.
我一直使用Mac OSX的常规软件更新功能更新Java。
I've always updated Java using the regular Software Update features of Mac OSX.
我过去使用过Java jvisualvm
工具并取得了巨大的成功。
I've used the Java jvisualvm
tool in the past with great success.
今天早上我像往常一样在命令行中输入 jvisualvm
。我收到以下错误:
This morning I typed jvisualvm
into the command line as I often do. I got the following error:
$ jvisualvm
Unable to locate an executable at "/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/jvisualvm" (-1)
全部其他Java工具( java
, javac
, jps
工作得很好。
All of the other Java tools (java
, javac
, jps
, etc.) work just fine.
/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin
确实不包含 jvisualvm
(突然间)。
/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin
indeed does not contain jvisualvm
(all of a sudden).
/ usr / libexec / java_home
产量:
$ /usr/libexec/java_home
/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
WTF ?
推荐答案
看起来像链接的混合; / usr / bin / jvisualvm符号链接指向不存在的东西(如上所述)。显然jvisualvm可执行文件(存根)存在,现在解决这个问题的方法是执行:
Seems like a mixup of links; the /usr/bin/jvisualvm symlink points to something that does not exist (as people pointed out above). Apparently the jvisualvm executable (stub) exists and the way to fix this for now is to execute:
cd /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin
sudo ln -s /System/Library/Java/Support/VisualVM.bundle/Contents/Home/bin/jvisualvm .
这需要sudo权限并创建缺少的符号链接,指向VisualVM包。不知道为什么会这样,但升级到最新的XCode 4.5.2并没有自动解决这个问题。我正在运行MacOS X 10.7.5和java 1.6.0_37
This requires sudo privileges and creates the missing symlink, pointing to the VisualVM bundle. No idea why it happened but upgrading to latest XCode 4.5.2 did not fix this for me automatically. I am running MacOS X 10.7.5 and java 1.6.0_37
这篇关于jvisualvm去哪儿了?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!