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

Comments:

Post a Comment:
  • HTML Syntax: NOT allowed
About

Blog about Java technology documentation and news about Java releases.

Search

Categories
Archives
« July 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
  
       
Today