The MLet service (javax.management.loading.MLet) has some support for including native libraries in jar files. At run-time, these libraries are extracted from the jar and stored into a temporary directory where they can be loaded like other jar files. The fact that this is possible is only hinted at in the documentation, specifically methods get/setLibraryDirectory. The mechanisms by which it works, in particular by which the right native library for the current architecture is found, are not documented at all.
It turns out that not all platforms can support this functionality. Some platforms do not allow you to add a new dynamically loadable native library just by writing things into the filesystem. For example, they may require external privileged tools to be run. Therefore the following changes should be made:
(1) Document more clearly that this functionality exists, but discourage people from using it because of the portability problems it poses.
(2) Explicitly allow get/setLibraryDirectory to throw UnsupportedOperationException if the underlying platform does not support this functionality. Any JMX implementation may choose not to support it.
###@###.### 2005-1-31 09:30:36 GMT