to get current process pid, my project used library sun.jvmstat.monitor.MonitoredHost in STS4. However, STS4 couldn't link this library and I couldn't compile my spring boot project.
import sun.jvmstat.monitor.MonitoredHost;
import sun.jvmstat.monitor.MonitoredVm;
import sun.jvmstat.monitor.MonitoredVmUtil;
import sun.jvmstat.monitor.VmIdentifier;
public class MonitorTest {
public static void main(String[] args) {
}
}
That's all the code I have.
Error :
The type sun.jvmstat.monitor.MonitoredHost is not accessible
The type sun.jvmstat.monitor.MonitoredVm is not accessible
The type sun.jvmstat.monitor.MonitoredVmUtil is not accessible
The type sun.jvmstat.monitor.VmIdentifier is not accessible
used openJDK version is :
java -version
openjdk 11.0.1 2018-10-16
OpenJDK Runtime Environment 18.9 (build 11.0.1+13)
OpenJDK 64-Bit Server VM 18.9 (build 11.0.1+13, mixed mode)