wood burning stoves*
The moose likes JDBC and the fly likes Code owrks in Netbeans but the Jar fails to execute the code outside netbeans 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 » Databases » JDBC
Bookmark "Code owrks in Netbeans but the Jar fails to execute the code outside netbeans" Watch "Code owrks in Netbeans but the Jar fails to execute the code outside netbeans" New topic
Author

Code owrks in Netbeans but the Jar fails to execute the code outside netbeans

Will Koester
Greenhorn

Joined: Jun 16, 2011
Posts: 1
So I am writing code to backup and restore some DB files. The code runs fine within Netbeans 7 but after packaging to a jar and running the same code it fails to stop the service and initiate the mysqldump command. I tried several modifications of the code and no change. Another set of eyes would be a great help on this. The first two sections of code are the button action and the SwingWorker. The third section works as a void or boolean within Netbeans just not outside it. I am thinking that this may be a Runtime exec issue but not sure. I tested from command line as well and it still fails to run the program jsut hangs there is no error or indication that it is going through the third section of code from task manager or any other monitoring tool.





Mike Zal
Ranch Hand

Joined: May 04, 2011
Posts: 144

I don't know if this is the problem but You should not use Runtime.exec


OCJP6, OCWCD5
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Code owrks in Netbeans but the Jar fails to execute the code outside netbeans
 
Similar Threads
Write and Update CSV files
Sending email using /usr/bin/mail
Accurately detecting 64 bit Windows architecture
a bug in the Runtime class
How to output from a java program called from PL/SQL