This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Unable to execute jar file....got following stack trace. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Unable to execute jar file....got following stack trace." Watch "Unable to execute jar file....got following stack trace." New topic
Author

Unable to execute jar file....got following stack trace.

Jigar Naik
Ranch Hand

Joined: Dec 12, 2006
Posts: 753
Hi,

i'm using jasper report for generating report.

following is my java class for displaying report,



i have created jar(JR.jar) file

the entry of MANIFEST.MF



when i double click on JR.jar file it gives me the following error



I have tested the Jr.jar file with following command and got the following stack trace




i'm also bundeling all the requeired jar file in my JR.jar file



I'm using JBoss Eclipse IDE 1.6, Jasper Assist for creating jasper report.

and i have tried to create jar file from dos as well as IDE but getting the same error.

can anybody help me out ???


Jigar Naik


Maurizio Nagni
Ranch Hand

Joined: May 29, 2004
Posts: 75
You cannot include jars in a jar. The classloaders will not find classes inside of multiple jars.
To do this, you'll need to write ( or find) a custom classloader or better add classes to your JAR File's Classpath according to

http://java.sun.com/docs/books/tutorial/deployment/jar/downman.html
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

Not an advanced question. Moving...


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14074
    
  16

Also make sure that your manifest file ends with an empty line, otherwise the last line in the manifest file will not be parsed correctly.

See this page, which says:

"Warning: The text file from which you are creating the manifest must end with a new line or carriage return. The last line will not be parsed properly if it does not end with a new line or carriage return."


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Unable to execute jar file....got following stack trace.
 
Similar Threads
jasper report- error
tomcat connection
org.xml.saxSAXNotRecognEx
unable to read file from war file
Unable to execute jar file....got following stack trace.