Why does not rsubgroup initialize Java?

57 Views Asked by At

I am working with R 4.2.1, 64bit, Windows 10.

while calling library rsubgroup, I get an error:

library(rsubgroup)
Loading required package: foreign
Error: package or namespace load failed for ‘rsubgroup’:
.onLoad failed in loadNamespace() for 'rsubgroup', details:
call: .jinit(parameters = parameters)
error: Unable to create a Java class loader.

rJava loads without problems.
I have installed Java 1.8.0_341 and JDK jdk-18.0.2
I have set-up manually JAVA_HOME and PATH variables.

Any hints what can go wrong with .jinit? many thanks!

Solved, caused by my comp installation: R is installed in C:.../ProgramFiles that is write-protected (accessible only by "admin"); rJava and rsubgroup installed in the ...Users personal library. While moving all installation (core R, libraries) to writable disk, all starts to work. Apologies for this dumb question but I leave it here - perhaps could help somebody in future...

0

There are 0 best solutions below