[R] Identifying presence of Java

Dirk Eddelbuettel edd @end|ng |rom deb|@n@org
Sat Nov 9 18:35:27 CET 2019


R does that for you already as it needs to know it for rJava too.

On my (Linux) box:

  edd using rob:~$ R CMD config JAVA
  edd using rob:~$ R CMD config JAVA_HOME
  edd using rob:~$ 

You could also do the equivalent of `which` or `type -p` from R:

  R> Sys.which("javac")
  R> Sys.which("javacdoesnotexist")

Hope this helps, Dirk

http://dirk.eddelbuettel.com | @eddelbuettel | edd using debian.org

More information about the R-help mailing list