• Post Reply Bookmark Topic Watch Topic
  • New Topic

problem executing this piped command  RSS feed

 
Benjamin Mulder
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to execute the following command from a java application. As you can see, I want to back up the BACKUP directory (which is located on the user home directory) to a CD without creating an ISO image.

From the shell it works like a charm.




But obviously my java implementation of that command doesn't work...any inputs are welcome. If you can tweak around my code to see your idea that would be wonderful. Thanks.

 
slade cox
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It would help to know exactly how your code fails. Does it generate an exception? Does the process generate any output/error messages? If the code doesn't exit abnormally try grabbing the error and input streams with listBurn.getInputStream() and listBurn.getErrorStream(), then print them out.

If an IOException is generated mkisofs might not be in the PATH of the process's environment. In that case you would need to pass the appropriate environment to the exec method. In any case, I'm sure it gives a more detailed error message than "doesn't work" so post it here.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!