-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can rJava install openjdk during the installation? #332
Comments
@moomoofarm1 see https://github.com/e-kotov/rJavaEnv
|
I don't see this a something that it should do. The user should install whichever Java version(s) they intended to use - rJava should not make the call. The only option I could see is if no JRE is found at initialization time then to either point to a way to install it or offer a local installation after a prompt with version options (sadly, Java has descended into the Python nightmare world by constantly breaking compatibility so you have to carefully select the version that works with the code you intend to run). rJava was originally designed to provided consistent support for R, so it is no different than other tools like compilers and libraries in R that needs to be present before they are used. That said, there is an issue on allowing run-time loads of JVM (see #334) - so in that world it would make it more sense to allow run-time installs, but that is different from this issue. |
Thanks for the answers. |
@moomoofarm1, the problem is, there are multiple versions of Java that may be required by various packages that you use. So you have to decide which Java version you need to install by reading the recommendations in the package documentation. The author of a particular package may provide you with instructions on how to install the exact version of Java that you need to use their package. For example, this is something the authors of So even if If you want the easiest method that will take into account your OS and processor type, please do: install.packages('rJavaEnv')
rJavaEnv::java_quick_install(version = 21) Or whichever Java version you need depending on the package you plan to use. Preferably, restart R after doing this. If you are on Linux (or on macOS/Windows, but you chose to install packages from source), you may need to remove |
I can not agree with more, becase annother package doing this job is appropriate. If you must do this, I recommand therJavaEnv package. And I really , recommand to install the Java manually. |
As stated in the title.
The text was updated successfully, but these errors were encountered: