Solved

can not access .xlsx file in class path from jar

Posted on 2012-12-26
3
577 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 

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

[Live Webinar] The Cloud Skills Gap

As Cloud technologies come of age, business leaders grapple with the impact it has on their team's skills and the gap associated with the use of a cloud platform.

Join experts from 451 Research and Concerto Cloud Services on July 27th where we will examine fact and fiction.

Question has a verified solution.

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

Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
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:
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

627 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