Win a copy of Java Challengers this week in the Java in General forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • paul wheaton
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Liutauras Vilda
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Piet Souris
Bartenders:
  • salvin francis
  • Mikalai Zaikin
  • Himai Minh

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

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.





 
Ranch Hand
Posts: 144
Oracle Fedora Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't know if this is the problem but You should not use Runtime.exec
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic