> I would like to capture this output in R using the system command, then 
> search for “No Java runtime installed” )or the correponding text in Windows).
>
> I execute something like:
>         CAPTURE <- system("Java -version", intern=TRUE, ignore.stderr=FALSE, 
> ignore.stdout=FALSE)
> (with various permutations of TRUE/FALSE for the options) but I cannot 
> capture what is displayed on the console.

That's fascinating...
I'm offsite, I'll try it tomorrow...

Two questions:
(1) What is the value of CAPTURE (or does it hang)?
(2) Can you run other java commands ("java MyClass", "javac MyClass.java", etc)?

Another thing, did you try Duncan's suggestion?
If that doesn't work, another possibility is to pipe the output, to a
command line app that echos the text.

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to