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 <benn.snyder@gmail.com> 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"/>

but
./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(Class.java:186)
    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 org.openscience.jmol.app.jmolpanel.JmolPanel.<init>(Unknown Source)
    at org.openscience.jmol.app.Jmol.<init>(Unknown Source)
    at org.openscience.jmol.app.jmolpanel.JmolPanel.getJmol(Unknown Source)
    at org.openscience.jmol.app.jmolpanel.JmolPanel.startJmol(Unknown Source)
    at org.openscience.jmol.app.Jmol.main(Unknown Source)
Caused by: java.lang.ClassNotFoundException: org.OpenNI.StatusException
    at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
    ... 13 more
Exception in thread "main" java.lang.NullPointerException
    at org.openscience.jmol.app.jmolpanel.JmolPanel.getJavaConsole(Unknown Source)
    at org.openscience.jmol.app.jmolpanel.JmolPanel.startJmol(Unknown Source)
    at org.openscience.jmol.app.Jmol.main(Unknown 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?


Benn

------------------------------------------------------------------------------
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
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Jmol-developers mailing list
Jmol-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-developers



--
Robert M. Hanson
Larson-Anderson Professor of Chemistry
Chair, Chemistry Department
St. Olaf College
Northfield, MN
http://www.stolaf.edu/people/hansonr


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