With the sqldf package, R is capable of not only statistics, but serious data mining as well - assuming there is enough RAM on your machine.
And with the RServe package R becomes a regular TCP/IP server; so you can call R out of java (or any other language if you have the api). There is also a package in R to call java out or R.