This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Java in General and the fly likes Runable JAR file not working properly Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Java » Java in General
Bookmark "Runable JAR file not working properly" Watch "Runable JAR file not working properly" New topic

Runable JAR file not working properly

Paras Ahuja
Ranch Hand

Joined: May 22, 2012
Posts: 62
Hi everyone,
I have made a Java project using Swing and JDBC. Now to make it run on another PC, i make a runnable JAR file of the project and simply run it on the PC.
The problem is it works fine ont the PC for some time and then suddenly stops working. When i restart the application, it again works fine.
Any idea why this error is occuring?
Please help...
Thanks in advance
Rob Spoor

Joined: Oct 27, 2005
Posts: 20077

Run the JAR file from the command line, using java -jar <jarfile>. My guess is that there is an exception that you don't see when you start the program by double clicking the JAR file.

How To Ask Questions How To Answer Questions
I agree. Here's the link:
subject: Runable JAR file not working properly
It's not a secret anymore!