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

Win a copy of Groovy Fundamentals video training course this week in the Groovy forum!
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: 19991

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
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
subject: Runable JAR file not working properly