jnew {rJava} | R Documentation |
Create a Java object
Description
.jnew
create a new Java object.
Usage
.jnew(class, ..., check=TRUE, silent=!check, class.loader=NULL)
Arguments
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. Set to
|
Value
Returns the reference (jobjRef
) to the newly created object or
null
-reference (see .jnull
) if something went wrong.
See Also
Examples
## Not run:
f <- .jnew("java/awt/Frame","Hello")
.jcall(f,,"setVisible",TRUE)
## End(Not run)