Cross post from
new-java/26805-installing-java-libraries.html. I didn't know which other sub-forum to put this in.
I'm getting the following error during runtime while attempting to use the JExcelAPI:
|
Code:
|
Exception in thread "main" java.lang.NoClassDefFoundError: jxl/Workbook
at demo.main(demo.java:10)
Caused by: java.lang.ClassNotFoundException: jxl.Workbook
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:319)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
at java.lang.ClassLoader.loadClass(ClassLoader.java:264)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:332)
... 1 more |
The jar has been put into jre/lib/ext and the test code compiles fine with
import jxl.*, but still no luck. It can see the package, but why can't it find the class definition?
This is the code I'm trying to test:
Workbook workbook = Workbook.getWorkbook(new File("excel.xls"))