Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

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

 
Sara Brown
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 55
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 55284
156
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What does changing error to warning mean? Is it an option on your IDE?
 
Jesper de Jong
Java Cowboy
Sheriff
Posts: 16006
87
Android IntelliJ IDE Java Scala Spring
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!