Runtime and IO redirection

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • prabhurangan
    New Member
    • Aug 2008
    • 1

    Runtime and IO redirection

    Hi Members,

    I tried to execute "Runtime.getRun time.exec("mysq l -u username -ppassword databaseName < c:/data/backup.sql;"

    But this command is not restoring my database, instead if i run the same comman d through command prompt it works fine. I have also gone through many document and discussion.

    Please help me in this to fix this issue.
  • JosAH
    Recognized Expert MVP
    • Mar 2007
    • 11453

    #2
    Hi, don't hijack another persons' thread; it is considered rude. I've split your post
    from the other thread and put it in its own thread.

    Runtime.exec() doesn't redirect input or output for you. If you want that you have
    to fire up a shell (command line interpreter) and let it do its job.

    kind regards,

    Jos (moderator)

    Comment

    Working...