jnew: Same as .jnew but with check = FALSE as default

Description Usage Arguments

View source: R/java_utils.R


Same as .jnew but with check = FALSE as default


jnew(class, ..., check = FALSE, silent = !check)



fully qualified class name in JNI notation (e.g. "java/lang/String").


Any parameters 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. Note that all named parameters are discarded.


If set to TRUE then .jcheck is invoked before and after the call to the constructor to clear any pending Java exceptions.


If set to FALSE then .jnew will fail with an error if the object cannot be created, otherwise a null-reference is returned instead. In addition, this flag is also passed to final .jcheck if check above is set to TRUE. Note that the error handling also clears exceptions, so check=FALSE, silent=FALSE is usually not a meaningful combination.

hoesler/dbj documentation built on May 15, 2017, 11:53 p.m.