new
.jnew
... arguments are passed to the constructor of the class specified as J("class.name").
...
J("class.name")
jclassName-class
v <- new(J("java.lang.String"), "Hello World!") v$length() v$indexOf("World") names(v)
Run the code above in your browser using DataLab