问题
the documentation describes how to pass a single parameter. No worries there. My challenge is trying to pass multiple parameters to java constructors that take them.
For example:
foo <- .jnew("some/java/class/that/takes/two/parameters", ???)
Comma delimiting doesn't work, nor does putting a space between them. How does one do this?
回答1:
This document explains how to work with different constructors. See section "looking up constructors and methods".
Apparently you have to call the new()
function instead of / after .jnew()
.
I'm also still experimenting...
来源:https://stackoverflow.com/questions/30088291/how-to-pass-a-rjava-jnew-call-multiple-parameters