I am able to run r script with rJava, but all the control flow in the r script file seem not running, mean it will run all the line without care about the if statement and the trycatch error. I run the same script in r or r studio and it can run perfectly.
error example:
if (1 != 0) {
c <- 200
} else {
c <- 100
}
in r the result c is 200, but when run in rjava the result c return always 100 because it will run through all the line of code despite the condition flow.