禁用 jconsole 弹出窗口:"Secure connection failed. Retry insecurely?"

Disable jconsole popup: "Secure connection failed. Retry insecurely?"

有没有办法禁用这个 jconsole 弹出窗口?

我知道我可以根据 http://docs.oracle.com/javase/7/docs/technotes/guides/management/agent.html#gdemv 设置 SSL,但这意味着我需要在所有服务器 (java) 和所有客户端 (jconsole) 上进行设置。对于非关键的内部应用程序来说,这不是最友好的解决方案。还有其他解决方案吗?

这不可能。 Jconsole 始终首先尝试使用 SSL 进行连接,并且无法更改此行为。从 jconsole 来源,它由

决定
 private boolean shouldUseSSL = true;

只有在使用SSL连接失败后才可以设置为false。 建议:使用其他 JMX 客户端工具(例如 jvisualvm 或 jmc)或启用 SSL。

不使用 SSL 是可以的!使用 jconsole -debug -J"-Djava.util.logging.config.file=FILENAME" 查看记录的异常。可能你还需要配置参数-Djava.rmi.server.hostname=server.example