ClasspathClasspath
A guide to the Java classpath managed by NetKernel
Home > Books > NetKernel Extensions > Classpath

Rate this page:
Really useful
Satisfactory
Not helpful
Confusing
Incorrect
Unsure
Extra comments:


Classpath

The classpath in Java defines the set of locations from which classes and resources may be located and it defines the order of the search. In general, the order is important because the first match satisfies the search.

In NetKernel, the Java classpath is context dependent and tightly managed. This control allows NetKernel to provide many benefits, such as module isolation and version management. Each module in NetKernel has its own classloader. The dynamic linking of modules creates a structured and ordered Java classpath. A module classloader starts a local search for classes and then progressively broadens the scope through the module context.

The NetKernel class and resource resolution order is as follows:

  1. The local module
  2. Any Jar files located in the local module's lib/ directory - order is not defined.
  3. The Java packages exported on the public interface of any modules imported into the local module in order of import.
  4. The parent classloader - generally this is the module superstack context from which the currently executing NetKernel request originated.
  5. The NetKernel core
  6. The [install]/lib/endorsed/ directory of the NetKernel installation.
  7. The Java Virtual Machine

Classpath Trace Tool

The classpath trace tool can provide detailed class resolution information for a given class in a specified module context.

© 2003-2006, 1060 Research Limited. 1060 registered trademark, NetKernel trademark of 1060 Research Limited.