SUBDISCLIB <- "subdisc-lib-2.1149.jar"
.onLoad <- function(libname, pkgname){
jarlib = system.file("java", SUBDISCLIB, package = pkgname)
if (file.exists(jarlib)){
rJava::.jinit(jarlib)
packageStartupMessage("JVM initialized. Loaded jar: ", jarlib, "\n")
} else {
packageStartupMessage("JVM not initialized: Cannot load", jarlib, "\n")
}
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.