The Java Tutorials' Weblog
Updated Trail: The Extension Mechanism
This trail has been updated to reflect changes that went into the JDK as far back as 1.3. There are two major points of interest in the update.
First, there's now support for installing extensions so that they can be
shared by multiple JREs. Prior to JDK 6, if you installed some extensions in
the lib/ext directory of one JRE and later installed another JRE, you had to
re-install your extensions in this newly-installed JRE's lib/ext directory.
As of JDK 6, that's no longer necessary: install them once in the shared
directory, and subsequent JRE installations will be able to access them. In
conjunction with this change, the value of the java.ext.dirs system property was changed from being that of a single directory to being a list of
directories (like a CLASSPATH). By default, it references the JRE-specific
and shared directories.
Second, Java Plug-in can cause installed extensions to be downloaded and installed on demand. Doing so makes use of manifest entries in both the installing and installed code. For example, consider an applet which depends on a jar file. The applet's jar file can use the manifest's Extension-List header to indicate dependent jar, including its version. The first time the applet is loaded, the dependent jar will be downloaded into the JRE's lib/ext directory and used. Subsequent uses of the same applet will also use the installed code instead of re-downloading the same jar files.
Read all about it, including sample code and manifest entries, at The Extension Mechanism.
-- Dave Bristor
Posted at 09:25AM Dec 13, 2006 by The Java Tutorial Team | Comments[1]
Wednesday Dec 13, 2006
thanks
Posted by mirc on February 17, 2008 at 01:15 PM PST #