I need to connect to JMX agent programmatically using Attach API (loading agent at runtime if necessary) as shown in example here. This worked fine in Java 8 but doesn't work in Java 9 since there is no management-agent.jar in the lib folder anymore:
String agent = vm.getSystemProperties().getProperty("java.home") +
File.separator + "lib" + File.separator + "management-agent.jar";
Could you please advice what is the right way to do that in Java 9?
Thanks in advance, Vadim