Open e-kotov opened 5 months ago
Check .Platform$pkgType
.
If binary
, just proceed with the usual drill (e.g. for java_quick_install()
, set paths in current session and in .Rprofile
).
If source
, also proceed, but give a visible notice to the user that they need to do R CMD javareconf
(or R CMD javareconf -e
of not root, but needs more testing, did not work for me in the macOS test rig).
It will probably be exactly the same for Linux and Windows.
Test report for macOS (Apple Silicon/aarch64/ARM) (with R packages installed from source)
System:
Test sequence:
1. Install Homebrew from https://brew.sh/
2. Install R and RStudio
3. Check if there is Java in vanilla macOS
4. Run RStudio
5. Check if {
rJava
} can be installed with Java installed using {rJavaEnv
}results in:
6. Try
javareconf
In Terminal, without admin rights:
Fails.
In Terminal, with admin rights:
Succeeds!
{rJava}
is built from source!Verdict
Overall,
{rJavaEnv}
package works as expected, but some manual actions are still required from the user. Specifically, the user needs to close R/RStudio and run two commands in the terminal with admin privileges to reconfigure Java.Originally posted by @e-kotov in https://github.com/e-kotov/rJavaEnv/issues/15#issuecomment-2198244577