Some JVMs have the Class Sharing option set on. Is there a way to detect whether that option is set on or off programmatically?
Thanks
no sane way to get this that i know of...
you could get the command line used to invoke your JVM and look fo the flags described here. if all you want to do is enforce that the feature is turned off thats easy - require the off flag to be present.
note that this doc is for 1.5 and it says that sharing also depends on the garbage collector being used, so you'll need to deduce that as well (also possible, given jvm version, command line, OS version and a lot of patience :-) ).
also you'll need to address this on a per-jvm vendor. the ibm jvm, for example, uses different flags
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With