I can install rJava seemingly fine from Rstudio:
install.packages("rJava")
trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.1/rJava_1.0-6.tgz'
Content type 'application/x-gzip' length 1138672 bytes (1.1 MB)
==================================================
downloaded 1.1 MB
The downloaded binary packages are in
/var/folders/qz/9s5hs9ss00z2yzj_r2668_3c0000gn/T//RtmpqNOAbP/downloaded_packages
But when I then try to call it from the library I get the following error:
library(rJava)
Unable to find any JVMs matching version "(null)".
No Java runtime present, try --request to install.
Error: package or namespace load failed for ‘rJava’:
.onLoad failed in loadNamespace() for 'rJava', details:
call: fun(libname, pkgname)
error: JVM could not be found
In addition: Warning messages:
1: In system("/usr/libexec/java_home", intern = TRUE) :
running command '/usr/libexec/java_home' had status 1
2: In fun(libname, pkgname) :
Cannot find JVM library 'NA/lib/server/libjvm.dylib'
Install Java and/or check JAVA_HOME (if in doubt, do NOT set it, it will be detected)
> library(rJava)
Unable to find any JVMs matching version "(null)".
No Java runtime present, try --request to install.
Error: package or namespace load failed for ‘rJava’:
.onLoad failed in loadNamespace() for 'rJava', details:
call: fun(libname, pkgname)
error: JVM could not be found
In addition: Warning messages:
1: In system("/usr/libexec/java_home", intern = TRUE) :
running command '/usr/libexec/java_home' had status 1
2: In fun(libname, pkgname) :
Cannot find JVM library 'NA/lib/server/libjvm.dylib'
Install Java and/or check JAVA_HOME (if in doubt, do NOT set it, it will be detected)
I have installed the latest version of Java and my R is version 4.1.2. I'm using Mac.
If anyone knows how to help I would be very grateful.
Thank you!
Related
install.packages("xlsx")
trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.2/xlsx_0.6.5.tgz'
Content type 'application/x-gzip' length 370371 bytes (361 KB)
==================================================
downloaded 361 KB
The downloaded binary packages are in
/var/folders/0g/h70b_3hx4hn10c2hybzy_4l40000gp/T//RtmpzUFLGT/downloaded_packages
library("xlsx")
The operation couldn’t be completed. Unable to locate a Java Runtime.
Please visit http://www.java.com for information on installing Java.
Error: package or namespace load failed for ‘xlsx’:
.onLoad failed in loadNamespace() for 'rJava', details:
call: fun(libname, pkgname)
error: JVM could not be found
In addition: Warning messages:
1: In system("/usr/libexec/java_home", intern = TRUE) :
running command '/usr/libexec/java_home' had status 1
2: In fun(libname, pkgname) :
Cannot find JVM library 'NA/lib/server/libjvm.dylib'
Install Java and/or check JAVA_HOME (if in doubt, do NOT set it, it will be detected)
write.xlsx(start_no_data)
Error in write.xlsx(start_no_data) : could not find function "write.xlsx"
uhh so apparently I needed to actually download Java first!!
I know there are a lot of questions on this issue. I have previously solved that problem with:
remotes::install_github(c("ropensci/tabulizerjars", "ropensci/tabulizer"), INSTALL_opts = "--no-multiarch")
but I have instaled R 4.2.1 in a new PC and I am not able to fix it this time,
I have succesfully installed rJava package but when I try above code I get this error:
Error: package or namespace load failed for 'tabulizerjars':
.onLoad failed in loadNamespace() for 'tabulizerjars', details:
call: NULL
error: .onLoad failed in loadNamespace() for 'rJava', details:
call: fun(libname, pkgname)
error: JAVA_HOME cannot be determined from the Registry
I have re-installed rJava several times but I keep getting the same error.
I would appreciate any help about it.
I hope someone can help me. We needed to install "xlsx" but it didn't work on my MacBook Air (10.15.7). So I tried to found a solution on websites and installed enter image description here this "install.packages("rJava", repos="http://rforge.net", type="source")"
I don't know how but I created a dependency and want to remove it. Every time I delete "rJava" in the packages it still shows up when I write "install.packages("xlsx") "library(xlsx)". My question is how do I remove the dependencies?
This is my outcome:
> install.packages("xlsx")
also installing the dependency ‘rJava’
> library(xlsx)
Unable to find any JVMs matching version "(null)".
No Java runtime present, try --request to install.
Fehler: package or namespace load failed for ‘xlsx’:
.onLoad in loadNamespace() für 'rJava' fehlgeschlagen, Details:
Aufruf: fun(libname, pkgname)
Fehler: JVM could not be found
Zusätzlich: Warnmeldungen:
1: In system("/usr/libexec/java_home", intern = TRUE) :
Ausführung von Kommando '/usr/libexec/java_home' ergab Status 1
2: In fun(libname, pkgname) :
Cannot find JVM library 'NA/lib/server/libjvm.dylib'
Install Java and/or check JAVA_HOME (if in doubt, do NOT set it, it will be detected)
How do I remove the dependency? THANK U SO MUCH
When I want to install the xlsx package, I get this error :
Loading required package: rJava
Error : .onLoad failed in loadNamespace() for 'rJava', details:
call: fun(libname, pkgname)
error: JAVA_HOME cannot be determined from the Registry
In addition: Warning message:
package ‘rJava’ was built under R version 3.3.3
Error: package ‘rJava’ could not be loaded
So I tried reinstalling rJava, but I get this :
Error : .onLoad failed in loadNamespace() for 'rJava', details:
call: fun(libname, pkgname)
error: JAVA_HOME cannot be determined from the Registry
In addition: Warning message:
package ‘rJava’ was built under R version 3.3.3
Error: package or namespace load failed for ‘rJava’
Do you guys have any simple solution to this ? I am not very familiar with R, and I just need it to bootstrap some data.
I had the same error recently (R Error: JAVA_HOME cannot be determined from the Registry). I found the solution here. In brief, Joachim Schork identified the problem as not the xlsx package but rather the rjava package. He explained that the problem usually is, as hartmut said, running a 64 bit version of R and a 32 bit version of Java. To resolve the problem according to his recommendation, you need to download and install the 64 bit version of Java. In my case, the solution included installing Java on my machine as it was never installed previously.
I would like to load mailR package in both my local rStudio and one run off an ec2 server. I get this error:
> require(mailR)
Loading required package: mailR
Error : .onLoad failed in loadNamespace() for 'rJava', details:
call: fun(libname, pkgname)
error: No CurrentVersion entry in Software/JavaSoft registry! Try re-installing Java and make sure R and Java have matching architectures.
In addition: Warning message:
package ‘mailR’ was built under R version 3.3.3
If I try to load rJava I get:
> require(rJava)
Loading required package: rJava
Error : .onLoad failed in loadNamespace() for 'rJava', details:
call: fun(libname, pkgname)
error: No CurrentVersion entry in Software/JavaSoft registry! Try re-installing Java and make sure R and Java have matching architectures.
In addition: Warning message:
package ‘rJava’ was built under R version 3.3.2
Thank you for the help!