Solved

can not access .xlsx file in class path from jar

Posted on 2012-12-26
3
562 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
Comment Utility
0
 

Accepted Solution

by:
nkk1712 earned 0 total points
Comment Utility
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
Comment Utility
i am using maven to package.

i resloved this issue by changing in assembly.xml
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:

763 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

7 Experts available now in Live!

Get 1:1 Help Now