我有这个代码
try {
url = new URL("http://miprueba.co.nf/prueba.xls");
input = url.openStream();
bookModel = new HSSFWorkbook(input);
} catch {
...
}
在服务器的 miprueba.co.nf 文件夹中,我有“myapplet.jar”和“prueba.xls”以及一个带有“poi-3.9-2021203.jar”的子目录“lib”
这是我在代码“bookModel = new ...”行中从控制台获得的消息
network: cache not found [URL: http://miprueba.co.nf/lib/poi-3.9-20121203.jar, versión: null]
network: Connectin http//miprueba.co.nf/lib/poi-3.9-20121203.jar con proxy=DIRECT
network: CleanupThread used 5 us
network: Downloading resource: http//miprueba.co.nf/lib/poi-3.9-20121203.jar
Content-Lenght: 1.821.732
Content-Encoding: null
network: Cache not found [URL: http//miprueba.co.nf/, versión: null]
network: Cache not found [URL: http//miprueba.co.nf/org/apache/poi/hssf/usermodel/HSSFWorkbook.class, versión: null]
network: Connecting http//miprueba.co.nf/org/apache/poi/hssf/usermodel/HSSFWorkbook.class con proxy=DIRECT
network: CleanupThread used 5 us
Exception in thread "AWT-EventQueue-2" java.lang.NoClassDefFoundError: org/apache/poi/hssf/usermodel/HSSFWorkbook
at applettest.Variables.<init>(Variables.java:50)
at applettest.myApplet.jButton2ActionPerformed(myApplet.java:124)
....
....
....
有什么帮助吗?我希望能够从 excel 文件“prueba.xls”中读取一个数字。提前致谢!