JDK-6223396 : MLet support for native libraries in jar files is underspecified and should be optional
  • Type: Bug
  • Component: core-svc
  • Sub-Component: javax.management
  • Affected Version: 6
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2005-01-31
  • Updated: 2017-05-16
  • Resolved: 2006-04-14
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6
6 b81Fixed
Description
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

Comments
EVALUATION Both the javadoc and PDF specs have been updated. MLet.findLibrary now details the algorithm used to find native libraries in jar files, and adds a @throws clause for implementations that do not support this functionality.
28-06-2006

EVALUATION Should be addressed for Mustang. Requires JCK change, see 6212909. ###@###.### 2005-1-31 09:30:36 GMT
31-01-2005