[R] How do I use simple calls to java methods?

Jeff Newmiller jdnewmil at dcn.davis.CA.us
Tue Oct 22 16:38:31 CEST 2013


I don't use rJava, but numerous examples came up when I Googled for "rjava examples". The fact that you have not referenced any of that material may be leaving a bad taste in the mouths of those few people who do use both R and Java. Or, they may just not spend time wading through emails on this list.

Also, note that Nabble has a poor reputation on this list, because it encourages you to look at Nabble for message history rather than including it in the email. Please re-read the Posting Guide for this list.
---------------------------------------------------------------------------
Jeff Newmiller                        The     .....       .....  Go Live...
DCN:<jdnewmil at dcn.davis.ca.us>        Basics: ##.#.       ##.#.  Live Go...
                                      Live:   OO#.. Dead: OO#..  Playing
Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
/Software/Embedded Controllers)               .OO#.       .OO#.  rocks...1k
--------------------------------------------------------------------------- 
Sent from my phone. Please excuse my brevity.

Hurr <hill0093 at umn.edu> wrote:
>I am surprised to not get a reply. 
>I suppose this means that extremely few, if any, use rJava.
>
>rJava.pdf says this, but I am too stupid to interpret it:
>Description
>.jcall calls a Java method with the supplied arguments.
>Usage
>.jcall(obj, returnSig = "V", method, ..., evalArray = TRUE,
>evalString = TRUE, check = TRUE, interface = "RcallMethod",
>simplify = FALSE, use.true.class = FALSE)
>
>Perhaps it means that to replace:
>      calCk <- calStgOfLinTim(linTm,tlev) 
>and use something like:
>      calCk <- .jcall(CalqsLin.class,returnSig = "S",
>      calStgOfLinTim(linTm,tlev),evalArray=FALSE, 
>      evalString = TRUE, check = TRUE, interface = "RcallMethod",
>      simplify = FALSE, use.true.class = TRUE)
>
>I suppose there are other setup things to do, 
>like start the JVM (java Virtual machine)
>and I don't know what obj means.
>
>Anyway, if I am able to do these simple java method calls, 
>it will be a big plus to our data analysis lab to use R conveniently.
>
>Please help
>
>
>
>
>--
>View this message in context:
>http://r.789695.n4.nabble.com/How-do-I-use-simple-calls-to-java-methods-tp4678753p4678786.html
>Sent from the R help mailing list archive at Nabble.com.
>
>______________________________________________
>R-help at r-project.org mailing list
>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.



More information about the R-help mailing list