You are using Eclipse? If so, when you have the jar files in place, the "import" command lines will stop showing a Java error. That's how you know you have it. That would be for running in Eclipse.

When you create the final JAR file for Jmol (app or applet) you have to edit build.xml to unpack those jar files into the bin directory like the others there so that the class files all get included in the final Jmol.jar or JmolApplet.jar.

On Thu, Sep 6, 2012 at 11:52 AM, Benn Snyder <> wrote:
> In Eclipse you have to use Project...Properties...Java Build
> Path...Libraries and add a pointer to that jar file there. That makes
> a change in the .classpath file. (Or, I guess you could hand edit that
> file.)
No dice.  I added to .classpath

<classpathentry kind="lib" path="jars/org.OpenNI.jar"/>
<classpathentry kind="lib" path="jars/com.primesense.NITE.jar"/>

./jmol -M kinect

uncaught exception: java.lang.NoClassDefFoundError: org/OpenNI/StatusException
java.lang.NoClassDefFoundError: org/OpenNI/StatusException
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(
    at org.jmol.api.Interface.getInterface(Unknown Source)
    at org.jmol.api.Interface.getOptionInterface(Unknown Source)
    at org.jmol.multitouch.ActionManagerMT.setViewer(Unknown Source)
    at org.jmol.viewer.Viewer.<init>(Unknown Source)
    at org.jmol.viewer.Viewer.allocateViewer(Unknown Source)
    at org.jmol.api.JmolViewer.allocateViewer(Unknown Source)
    at<init>(Unknown Source)
    at<init>(Unknown Source)
    at Source)
    at Source)
    at Source)
Caused by: java.lang.ClassNotFoundException: org.OpenNI.StatusException
    at Method)
    at java.lang.ClassLoader.loadClass(
    at sun.misc.Launcher$AppClassLoader.loadClass(
    at java.lang.ClassLoader.loadClass(
    ... 13 more
Exception in thread "main" java.lang.NullPointerException
    at Source)
    at Source)
    at Source)

I also tried <classpathentry kind="lib"
path="/usr/share/openni/lib/org.OpenNI.jar"/> with the same result.  How
do I get Jmol to find those jars at runtime?


Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
Jmol-developers mailing list

Robert M. Hanson
Larson-Anderson Professor of Chemistry
Chair, Chemistry Department
St. Olaf College
Northfield, MN

If nature does not answer first what we want,
it is better to take what answer we get.

-- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900