Check out the JRI/rJava project which provides a Java/R interface. After you download the package, see the examples directory.
Another option is to use the RCaller library (though I've never tried it myself...this question suggests potential performance issues).
REF
https://stackoverflow.com/questions/8509120/how-can-i-use-java-to-output-an-r-graph
===============
String rScriptFileName = rPath+"My_R_Script.R";
Runtime.getRuntime().exec("mypathto\\R\\bin\\Rscript "+rScriptFileName);
===============
Runtime.getRuntime().exec("Rscript myScript.R");
===============
Process child = Runtime.getRuntime().exec(command, environments, dataDir);
<