[R] Identifying presence of Java

Duncan Murdoch murdoch@dunc@n @end|ng |rom gm@||@com
Sat Nov 9 18:46:54 CET 2019

On 09/11/2019 12:33 p.m., Dennis Fisher wrote:
> Jeff
> A.  I can certainly look for the output from Java — but that was not the point — nothing was captured to CAPTURE with either scenarios.
> B.  I tried changing case — that did not solve the problem.
> The issue remains — when I execute the system command, the text output that I presented below is not being displayed.
> Is there a way to capture that output?  If so, I can certainly figure out how to parse it.

These seem to work for me:

  system("Java -version 2>&1", intern = TRUE)

  system2("Java","-version", stdout = TRUE, stderr = TRUE)

These are based on reading the help pages, which sometimes helps.

Duncan Murdoch

More information about the R-help mailing list