I'm working on a
Java application that opens an .xls file reads the data and updates a database accordingly. To open the spreadsheet I'm using the POI API.
I have developped my application using Eclipse 3.0 and everything works properly in that environment. But once I make my executable jar I get NoClassDefFound errors when I try to open the .xls file. I have included the POI jar in my class path and when I leave it out my app errors out sooner than when I leave it in.
my command line looks like this: java -cp poi.jar; -jar myjar.jar
and the error looks like so
java.lang.NoClassDefFoundError: org/apache/poi/hssf/eventusermodel/HSSFListener
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
Thanks in advance for you help
John Martinson