aspose file tools*
The moose likes Beginning Java and the fly likes Problem with JAR Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Problem with JAR" Watch "Problem with JAR" New topic
Author

Problem with JAR

Rajan Venkat
Ranch Hand

Joined: Dec 17, 2006
Posts: 35
Recently i have created an application to generate excel reports with the help of Java Swing for GUI and Jakarta POI for excel generation.Everything is working fine when i run the program from eclipse but the problem is with JAR which i have created from the program.

The GUI is working fine but the excel generation is not happening when i run the JAR . I have given GUI as a main class to load which will call the excel generation class later . I have put both the class in the default package. Can anyone help on how to make the excel generation happen ?


regards,<br /> rajan<br /> SCJP 1.4
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39529
    
  27
Are you certain there aren't any exceptions being thrown? Have you checked the log files?


Ping & DNS - updated with new look and Ping home screen widget
Rajan Venkat
Ranch Hand

Joined: Dec 17, 2006
Posts: 35
No exception is thrown. Its running fine when i run the program in eclipse.Have created JAR with the help of eclipse.When i checked the JAR contents i could see both classes that is GUI class and report generation class.

Do i need to add the JAKARTA POI JAR in the package where my both classes resides.
Rajan Venkat
Ranch Hand

Joined: Dec 17, 2006
Posts: 35
Anyone one of you guys help me please.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39529
    
  27
Do i need to add the JAKARTA POI JAR in the package where my both classes resides.


I'm not sure what you mean by this, but POI needs to be in the classpath.
Rajan Venkat
Ranch Hand

Joined: Dec 17, 2006
Posts: 35
Ulf,

I have added the Jakarata POI JAR in my classpath inside my JAR,but its not generating the report.

Let me explain my program flow that would help you to answer me.
There are two java program 1) ReportGui.java 2) Report.java

ReportGui is to build the GUI to get user input, once the submit button is clicked it will call the Report program to build the Excel report.

Everything is working fine in Eclipse, the report is not calling when i run the JAR directly. Hope this will help you to guide me.Please let me know if you need furthur informayion.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Problem with JAR
 
Similar Threads
how can i find a file in jar
Executing a jar file
Reading a Excel file using java programe
Running JAR file problem...
Creating an executable jar for a complex Java project