使用clojure.java.jmx我尝试连接受用户名/密码保护的JMX服务器:
(jmx/with-connection {:host "my.server", :port 50001 :environment {"jmx.remote.credentials" ["username" "password"]}} (jmx/mbean "java.lang:type=OperatingSystem"))
但我得到的是:
ClassNotFoundException clojure.lang.PersistentVector (no security manager: RMI class loader disabled) sun.rmi.server.LoaderHandler.loadClass (LoaderHandler.java:396)
Aby想到这里发生了什么?
答案 0 :(得分:1)
(jmx/with-connection {:host "my.server", :port 50001 :environment {"jmx.remote.credentials" (into-array String ["username" "password"])}} (jmx/mbean "java.lang:type=OperatingSystem"))