WARNING: This server provides a static reference view of the NetKernel documentation. Links to dynamic content do not work. For the best experience we recommend you install NetKernel and view the documentation in the live system .

Name:Jar Accessor
Description:access resources from inside Java jars
Identifier Syntax

Jar Accessor is an accessor using a standard identifier grammar:

    <group name="jar">jar:

with the following arguments: (for more details on argument passing details see here)

jarString (unknown)(no description available)
Request Verbs

The following verb is supported:


The response representation of this accessor for SOURCE requests is unknown.

This accessor throws no documented exceptions.

Import Requirements

To use Jar Accessor accessor you must import the module urn:com:1060research:www3:



The jar: scheme is an internal NetKernel URI scheme that supports the identification of any or all parts of a JAR archive physical resource. A Java Archive (JAR) is a single physical file that uses a file system abstraction to organize files internally. A JAR file contains a root directory and any number of files and sub-directories.


The syntax for the scheme is:

Resource Identifier Syntax


For example, to reference the file conferencelist.txt within the internal sub-directory documents/ within the JAR file data.jar, residing in the Unix file system directory /home/rsk/, use the following URI:



When a request with the SOURCE verb is issued to the jar: scheme the contents of the specified file found within the specified JAR file on the underlying file system of the computer hosting the NetKernel platform is returned as a org.netkernel.layer0.representation.IReadableBinaryStreamRepresentation object.

If a requested entry in a JAR file is missing then the exception FileNotFoundException is thrown. If the identified JAR file is missing then the exception ZipException is thrown. If the entire JAR file is requested (there is no {entry} in the URI) then the exception IOException is thrown.


This example shows the retrieval of the contents of a particular file in the root location within a JAR file:

request = context.createRequest("jar:file:/home/rsk/data.jar!/about.txt");
fileContents = context.issueRequest(request);


This example shows the retrieval of the contents of a particular file in a sub-directory within a JAR file:

request = context.createRequest("jar:file:/home/rsk/data.jar!/2007/history.txt");
fileContents = context.issueRequest(request);