Solved

can not access .xlsx file in class path from jar

Posted on 2012-12-26
3
568 Views
Last Modified: 2013-01-01
hi ,
the following code having some problem.

final Workbook workbook = new Workbook(ClassLoader.getSystemResourceAsStream("test.xlsx"));

how to achive this. this code working fine with my eclipse, but when packge the same i am getting the following ..

java.util.zip.ZipException: incomplete literal/length tree
0
Comment
Question by:nkk1712
  • 2
3 Comments
 
LVL 86

Expert Comment

by:CEHJ
ID: 38721055
0
 

Accepted Solution

by:
nkk1712 earned 0 total points
ID: 38726070
i am using maven to package.

i resloved this issue by changing in assembly.xml file as follows.

<fileSet>
      <directory>src/main/resource/</directory>
      <outputDirectory>lib</outputDirectory>
      <filtered>false</filtered>
</fileSet>
0
 

Author Closing Comment

by:nkk1712
ID: 38734275
i am using maven to package.

i resloved this issue by changing in assembly.xml
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
groupSum6 challenge 6 86
HashTable highest marks enumeration alternative 9 38
MySqlDump not dumping triggers 1 31
What's wrong with this code? 4 23
Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question