It seems that the last java version makes rJava not able to load or compile / install.
Is there any way I can have java8 and java9 installed and force rJava or R use the java8 version?
Edit: It's been suggested that perhaps this thread is the solution to my problem, but it isn't. Since I need to use a lower version, not the new one. Seems that it's possible to tell R where is the java_home, but I don't know how.
Take a look here: R, Java, rJava and macOS adventures and here: R 3.4, rJava, macOS and even more mess ;)
R, Java and proper settings that make every piece of software happy can be a struggle ;)
You need to play with JAVA_HOME, R CMD javareconf, and sometimes even compilation of rJava from sources.
If you need a specific version of Java just for R, you can always play with something like this.
First, get the list of JVMs
Then, pick one just before starting R
This way, in system you will have Java 9, while for R, you will have 1.8.