`
wbj0110
  • 浏览: 1564905 次
  • 性别: Icon_minigender_1
  • 来自: 上海
文章分类
社区版块
存档分类
最新评论

How to run VisualVM in Ubuntu

阅读更多

Running VisualVM in Ubuntu.
I am new hand in Linux OS. So I hope my experience can help people in similar conditions.
First, of course, you need to install Java Development Kit (JDK) into your ubuntu since it is not defauly installed.

 
Second, it is time to install VisualVM.
VisualVM is free and open source software. If you install Sun-JDK, it is already binded. If you installed open-JDK like me, you need to download and install it independently.

sudo apt-cache search visualvm
(# now make sure you can download VisualVM from your software repository)
(# if there is not any visualVM in your current repository, you need to search internect to learn how to add new repository)

sudo apt-get install visualvm
(# Then visualVM will be installed to default path. In my machine, it is "usr/lib/visualVM")


After installation, the main code and resources of VisualVM can be found in default installation path (in my PC, it is “usr/lib/visualVM”), and the short cut start file (“jvisualvm”) will be created in “usr/lib”.
Third, before you directly run VisualVM, you MUST edit the auto-generated script file “jvisualvm” to match the java environment.
I hate using VI in Linux because I cannot remember hotkeys. So I installed leafpad (a simple notepad software) to edit txt files.


apt-cache search 'notepad*'
(# here I found 'leafpad' available in my repository, so I installed it)

sudo apt-get install leafpad


The default content of script file MUST be changed, unless you cannot launch VisualVM successfully.
There is a section of code (as follows) in the file. (maybe starts from line 12). It means that the system checks all given paths (from [path1] to [path n]), if any path includes file “javac” in sub-folder “[path]/bin”, then VisualVM will use this path as “jdkhome”.


jdkhome=
for j in [path1] [path2] ... [path n]; do
if [-x $j/bin/javac ]; then
   jdkhome=$j
   break;
fi
done

So here lies the problem. 
WHEN YOU INSTALL VISUALVM, the content of this script file will not be updated according to your own JAVA ENVIRONMENT.
so I changed the this section of code as follows to solve the problem (by inserting my JDK path into condition part):

jdkhome=
for j in /usr/lib/jvm/openJDK-1.7 [path 1] [path 2] ... [path n]; do
if [-x $j/bin/javac ]; then
   jdkhome=$j
   break;
fi
done

DO NOT FORGET TO SAVE THE FILE!
DO NOT FORGET TO REOPEN THE FILE TO CHECK YOUR CHANGE!
Now, you can successfully invoke VisualVM.
Enjoy monitoring!

分享到:
评论

相关推荐

    visualvm_206

    VisualVM is distributed as ... Standalone tool runs on any compatible JDK, bundled tool is configured to run using the host GraalVM. VisualVM has also been distributed in Oracle JDK 6~8 as Java VisualVM

    visualvm143.zip

    visualvm143.zip

    VisualVM 2.1.5 (visualvm-215.zip)

    VisualVM 2.1.5 (visualvm_215.zip)是一个集成了命令行 JDK 工具和轻量级分析功能的可视化工具。 专为开发和生产时间使用而设计。

    VisualVM_142 For Mac

    VisualVM 142 For Mac,亲测好用 VisualVM 是一个工具,它提供了一个可视界面,用于查看 Java 虚拟机 (Java Virtual Machine, JVM) 上运行的基于 Java 技术的应用程序(Java 应用程序)的详细信息。VisualVM 对 ...

    visualvm_144.zip

    visualvm_144.zip 官网 最新版的Java visualvm 性能监控

    VisualVM介绍

    VisualVM安装、功能介绍、远程监控设置

    VisualVM简介

    VisualVM简介

    VisualVM官网1.4.1下载

    VisualVM is a visual tool integrating commandline JDK tools and lightweight profiling capabilities. Designed for both development and production time use.

    visualvm中文版

    visualvm,java jvm监控工具,可远程调试程序,idea下载-visualvm-launcher插件容易使用

    jvm监控工具visualVM

    visualVM,放到%JAVA_HOME%\bin目录下即可。

    visualvm 中文版

    可以使用VisualVM生成和分析海量数据、跟踪内存泄漏、监控垃圾回收器、 执行内存和CPU分析,同时它还支持在MBeans上进行浏览和操作。

    visualvm下载地址.txt

    与压力测试并用的监控工具visualvm,说明:VisualVM is a visual tool integrating commandline JDK tools and lightweight profiling capabilities. Designed for both development and production time use.

    VisualVm虚拟机监控工具

    VisualVm虚拟机监控工具,实时监控JVM运行时内存分配情况

    visualvm202

    visualvm官网下载地址http://visualvm.github.io/download.html perfma.com https://gceasy.io/ https://processon.com/

    visualvm_201.zip

    visualvm_201是jvm调优的一个测试工具

    visualvm_14.zip

    性能分析神器VisualVM VisualVM 是一款免费的,集成了多个 JDK 命令行工具的可视化工具,它能为您提供强大的分析能力,对 Java 应用程序做性能分析和调优。

    Visualvm工具

    Visualvm多合一故障处理工具

    visualvm eclipse 插件

    VisualVM 提供在 Java 虚拟机 (Java Virutal Machine, JVM) 上运行的 Java 应用程序的详细信息。在 VisualVM 的图形用户界面中,您可以方便、快捷地查看多个 Java 应用程序的相关信息。

    visualvm_137中文版

    visualvm_137中文版 java性能测试工具VisualVM

Global site tag (gtag.js) - Google Analytics