jnew {rJava}R Documentation

Create a Java object

Description

.jnew create a new Java object

Usage

.jnew(class, ...)

Arguments

class fully qualified class name in JNI notation (e.g. "java/lang/String").
... Any parametes that will be passed to the corresponding constructor. The parameter types are determined automatically and/or taken from the jobjRef object. For details see .jcall.

Value

Returns the reference (jobjRef) to the newly created object or NULL if something went wrong.

See Also

.jcall

Examples

## Not run: 
f <- .jnew("java/awt/Frame","Hello")
.jcall(f,,"setVisible",TRUE)
## End(Not run)

[Package rJava version 0.3-6 Index]