jnew {rJava} | R Documentation |
.jnew
create a new Java object.
.jnew(class, ..., check=TRUE, silent=!check, class.loader=NULL)
class |
fully qualified class name in JNI notation (e.g. |
... |
Any parameters that will be passed to the corresponding
constructor. The parameter types are determined automatically and/or
taken from the |
check |
If set to |
silent |
If set to |
class.loader |
optional class loader to force for loading the class. If not set, the rJava class loader is used first. The default Java class loader is always used as a last resort. This is for expert use only! If you set the class loader, the class loading behavior changes - use only in very special circumstances. |
Returns the reference (jobjRef
) to the newly created object or
null
-reference (see .jnull
) if something went wrong.
## Not run: f <- .jnew("java/awt/Frame","Hello") .jcall(f,,"setVisible",TRUE) ## End(Not run)