jsys <- .JClass("System")
jsys$getProperties()
jsys$getProperty("java.class.path")
rt <- .JClass("Runtime")$getRuntime()
rt$exec("whoami")
rt$exec(paste("find",system.file("scripts", pkg="Java")))
frame <- .JNew("JFrame")
frame$setBackground(.JClass("Color")$red())
Run the code above in your browser using DataLab