United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6223396 MLet support for native libraries in jar files is underspecified and should be optional
JDK-6223396 : MLet support for native libraries in jar files is underspecified and should be optional

Details
Type:
Bug
Submit Date:
2005-01-31
Status:
Resolved
Updated Date:
2010-07-29
Project Name:
JDK
Resolved Date:
2006-04-14
Component:
core-svc
OS:
generic
Sub-Component:
javax.management
CPU:
generic
Priority:
P2
Resolution:
Fixed
Affected Versions:
6
Fixed Versions:

Related Reports

Sub Tasks

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

Should be addressed for Mustang.  Requires JCK change, see 6212909.
###@###.### 2005-1-31 09:30:36 GMT
                                     
2005-01-31
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.
                                     
2006-06-28



Hardware and Software, Engineered to Work Together