当前位置: 首页 > 工具软件 > JVM Monitor > 使用案例 >

eclipse java的jvm匹配_java – jvmmonitor没有在eclipse中列出任何JVM

赫连瀚
2023-12-01

我试图使用jvmmonitor在eclipse中配置我的应用程序,但没有列出jvms,甚至没有运行的eclipse jvm,当我启动我的应用程序时,新的jvm没有出现.

At least one JVM (Eclipse itself) should be shown on JVM Explorer. If no JVM is shown, it is likely that Eclipse is not started with supported JDK. For example, JRE might be used instead of JDK.

To solve the issue,

Check the value of system property java.home with Help > About Eclipse > Installation Details > Configuration. You may see that the supported JDK is not specified to java.home.

Close Eclipse.

To enforce using a desired JDK on Eclipse, specify the option -vm to the eclipse executable, or alternatively specify it in eclipse.ini. See the Workbench User Guide to learn how to specify that option.

Start Eclipse.

eclipse配置中的java.home属性表示/ home / myname / programs / jdk / jre

我试图改变它,但没有任何意义.我的-vm已经设置为jdk目录,我的linux .profile和.bashrc导出到JAV目录,但是eclipse中的java.home仍然说/ home / myname / programs / jdk / jre

我还在java>监视器>工具首选项页面中将jdk根目录设置为/ home / myname / programs / jdk /但仍然没有运气.

我已经卸载了jvmmonitor并完全重新安装它,但没有任何变化.

我用jdk 7和jvmmonitor 3.8运行eclipse indigo

这让我疯狂,任何想法都会受到欢迎

提前致谢

解决方法:

经过几个小时的摆弄,我找到了解决方案.我现在使用VisualJVM,但它们通过连接到本地套接字并设置JMX连接以相同的方式运行.

首先,jvmmonitor / visualjm和你的java应用程序必须在同一个用户下运行.

用户必须具有linux / tmp /上的tmp directry的写访问权限.

当启动任何Java应用程序时,在tmp中的hsperfdata_myusername文件夹中创建具有java程序的进程PID的本地文件,该文件由java分析软件用于连接到运行java程序的jvm.

如果从终端启动java程序,并且终端的当前目录不是您的主目录,例如.从MYNAME:/ home / myname / project / myjavaapp $启动您可能会发现您可以连接到jvm但无法对其进行采样或配置.使当前目录成为主目录应解决此问题.

标签:java,eclipse

来源: https://codeday.me/bug/20190902/1787981.html

 类似资料: