Solved

can not access .xlsx file in class path from jar

Posted on 2012-12-26
3
565 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Protect jar file - windows app 2 38
Responding to Java JComponent extended classes's resize event 4 50
Java Jpanels and Jframe 8 28
xampp tool 12 24
Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:

911 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now