This concerns code we have in Oracle JDeveloper which collect thread dumps of all Java Processes on local host. This code uses the non-public JDK classes:
     import sun.jvmstat.monitor.MonitorException;
     import sun.jvmstat.monitor.MonitoredHost;
     import sun.jvmstat.monitor.MonitoredVm;
     import sun.jvmstat.monitor.MonitoredVmUtil;
     import sun.jvmstat.monitor.VmIdentifier;

to identify the Java processes on local host, and

     import com.sun.tools.attach.VirtualMachine;
     import sun.tools.attach.HotSpotVirtualMachine;

to attach to the processes and dump their threads.

The trouble is that these classes are not accessible anymore in JDK9 unless -XaddExports: is used.

Does anybody know how to do this functionality using public classes, or are there plans to add public classes to replace these non-public classes?

Keimpe Bronkhorst
Oracle JDeveloper


Reply via email to