aspose file tools*
The moose likes Java in General and the fly likes how to access com.sun.management.OperatingSystemMXBean in eclipse Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "how to access com.sun.management.OperatingSystemMXBean in eclipse" Watch "how to access com.sun.management.OperatingSystemMXBean in eclipse" New topic
Author

how to access com.sun.management.OperatingSystemMXBean in eclipse

Sara Brown
Ranch Hand

Joined: Feb 22, 2012
Posts: 55
i use jre6 and it can access the sun.management.ManagementFactory and com.sun.management.OperatingSystemMXBean

but when im using se jre-7, it would not allowed. access restriction.

im trying download back the jre6 or do anything to make sure it can access but still it wont happen. is there anyway? please.. im really hoping i could use this MXBean
Sara Brown
Ranch Hand

Joined: Feb 22, 2012
Posts: 55
is there another way? i found one of the solution it said that just configure the setting from error to warning. but that is only make the error invisible, not to access.

is there another way to use the mxbean, anyone?
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 36598
    
  16
What does changing error to warning mean? Is it an option on your IDE?
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 13884
    
  10

You are not supposed to use classes in the sun.* and com.sun.* packages. They are not part of the public API, and as you've experienced they could be changed by Oracle in any new version.


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to access com.sun.management.OperatingSystemMXBean in eclipse
 
Similar Threads
How to use check boxes with same name
Direct download Jre6
Get System Cache on Windows
OperatingSystemMXBean.getTotalPhysicalMemorySize()
ERROR with using JDBC to connect to DB2 Express C