添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
Hello,

I'm trying to restore data using mysql command.

Here is the code to take backup.


And finally here is the code for restore



Backup works perfect but restore hangs for ever....

Tried the same mysql command with < in command prompt which is working fine. But could not make it to work in Java . And in the logs there is no error or warning.

Please help me in this.

Regards,
Kiran
You have the classic deadlock associated with Runtime.exec() and ProcessBuilder. You are waiting for the process to complete but it can't complete because either the process stdout or stderr buffer becomes full. The process then suspends until there is room in the buffer to place more output but since you do not process either the stdout or stderr to make more room available until the process completes you have a deadlock.

You need to read ALL the sections of http://www.javaworld.com/article/2071275/core-java/when-runtime-exec---won-t.html and implement ALL the recommendations.
You showed up just in time for the waffles! And this tiny ad:
The Low Tech Laboratory Movie Kickstarter is LIVE NOW!
https://www.kickstarter.com/projects/paulwheaton/low-tech contact us | advertise |