1

I have this error message and I don't know how to solve it

Loading required namespace: rJava Failed with error: ‘.onLoad failed in loadNamespace() for 'rJava', details: call: dyn.load(jli, FALSE) error: unable to load shared object '/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/lib/jli/libjli.dylib': dlopen(/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/lib/jli/libjli.dylib, 0x000A): tried: '/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/lib/jli/libjli.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e')), '/usr/lib/libjli.dylib' (no such file)’ Cannot load rJava Error in .local(x, p, ...) : maxent() is not TRUE

Phil
  • 7,287
  • 3
  • 36
  • 66
  • Sounds like you have an M1 Mac, but installed an x86-64 (Intel/AMD) Java. That said, applets are outdated technology, so it is suspicious something is even trying to load something applet related. – Mark Rotteveel Nov 18 '21 at 14:08
  • 2
    Download Java with `ARM 64` - https://www.oracle.com/java/technologies/downloads/#jdk17-mac ; Make sure you are using `ARM 64` version of `rJava` as well. Also, make sure to set your Java version (inside system) to the version you want to user `ARM 64`. You can do it by setting `JAVA_HOME` and exporting `PATH` such way it points to your Java version. Then, run `R` from `CLI`. Also, it might be required to setup your `Java` env inside `R`: https://www.owsiak.org/r-java-11-and-making-sure-you-can-load-rjava/ – Oo.oO Dec 09 '21 at 19:44

0 Answers0