• 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
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

Reading the output from a bat file run by Runtime.exec

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I am running the VSS command line from a java app.

I run the runtime.exec, this executes a bat file.

I need to read the output of the process - which is the contents of a file from VSS.

However my reader only shows me the that it has run each line from the bat file, not any of the ouput. I kept thinking i should be using the p.getOutputStream() method, but i can only write to that. I am most confused.

At present i have the following code



I am sure i am missing something obvious here.

Thanks in advance

Matt
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to JavaRanch.

This article explains some of the pitfalls of Runtime.exec; it might be of help.
 
Matthew Hersee
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks for the response

i looked in the errorstream and it was permissions that were stopping the final statement of my bat file from running. Hence no output

this is signed off
 
reply
    Bookmark Topic Watch Topic
  • New Topic