Packages. These 2 objects let you make use of the standard JDK classes, e.g.,
var aJavaList = new java.util.LinkedList();
If you want to load your own JARs, then you can create your own Java class loader, e.g.,
/* This was necessary for a while, but not as of Java 6 update 12 var urlClasz = java.lang.Class.forName("java.net.URL");
var urlArray = java.lang.reflect.Array.newInstance(urlClasz,1);
urlArray = new java.net.URL('http://foo.net/bar.jar');
var cl = new java.net.URLClassLoader(urlArray); */
The extension XqUSEme borrows some of the code of the above in order to grant full privileges to Java within a Firefox extension, but it is easier to understand and doesn't require creation of a XPCOM component. (See also the Talk page for further potential examples of class instantiations which can also work on JAR files not placed in the /components directory.