Reading excel file inside jar file using jxl api not working !!
Rakhee Atri ,78
Greenhorn
Joined: Jul 11, 2006
Posts: 2
posted
0
Hi, Can any body help me?
I am running mfc.jar file from path: D:\Nidhi\final\.
This jar file contains package mfcalculator and mfcreport.xls file. So excel file is outside mfcalculator. I am reading this xls file in mfcalculator\Report.java by following code:
This work fine if I run class file but gives I/O exception as mfcreport.xls inside jar can not be read . If I put mfcreport.xls in the same directory where my jar file is,it detects excel file.
Is there any way to wrap excel file inside jar file?
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35223
7
posted
0
Welcome to JavaRanch.
You can obtain an InputStream representing a file within a jar file by using