简体   繁体   English

JMX客户端Eclipse问题

[英]JMX Client Eclipse issue

I am trying to create JMX Client application. 我正在尝试创建JMX客户端应用程序。

I run my JMX application with following command: 我使用以下命令运行JMX应用程序:

java -cp . -Dcom.sun.management.jmxremote.port=1234 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false MyJMXClass

Now when I run the client application from terminal, it works fine. 现在,当我从终端运行客户端应用程序时,它可以正常工作。

java -cp . MyJMXClient

But when I run the same program from Eclipse, I got following exception. 但是,当我从Eclipse运行相同的程序时,出现以下异常。

Error: Exception thrown by the agent : java.rmi.server.ExportException: Port already in use: 1234; nested exception is: 
    java.net.BindException: Address already in use

I am confused why it works fine from terminal but not in Eclipse. 我很困惑为什么它不能在终端上正常运行,而在Eclipse中却不能正常运行。

我只是遇到了问题,我已经在Eclipse的JMX端口中保存了运行配置,这就是为什么它抛出此异常后,一旦将其删除就可以正常工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM