I'm having a little trouble with some Java code I'm trying to compile in Eclipse. I keep getting the following warning...
Access restriction: The type OperatingSystemMXBean is not accessible due to restriction on required library C:Program FilesJavajre6lib
t.jar
From this line of code...
com.sun.management.OperatingSystemMXBean bean = (com.sun.management.OperatingSystemMXBean) java.lang.management.ManagementFactory.getOperatingSystemMXBean();
I've found ways around this but I'm worried about the restriction warning. This code is for my open source project (CfTracker) and I don't want to work around this restriction if I'm going to be breaking some sort of license agreement. Can anyone help me understand this?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…