I am trying to create JMX Client application.
I run my JMX application with following command:
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.
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的JMX端口中保存了运行配置,这就是为什么它抛出此异常后,一旦将其删除就可以正常工作。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.