michaelkalish / STA

State Trace
2 stars 5 forks source link

Error: package or namespace load failed for ‘rJava’: #4

Open OmidGhasemi21 opened 4 years ago

OmidGhasemi21 commented 4 years ago

Hi. I tried to use this package on Rstudio. I installed java and then, according to the instructions, ran source("staCMRsetup.R"). However, I got this error message:

Error: package or namespace load failed for ‘rJava’:
 .onLoad failed in loadNamespace() for 'rJava', details:
  call: dyn.load(file, DLLpath = DLLpath, ...)
  error: unable to load shared object '/Users/45050007/Library/R/3.6/library/rJava/libs/rJava.so':
  dlopen(/Users/45050007/Library/R/3.6/library/rJava/libs/rJava.so, 6): Library not loaded: /Library/Java/JavaVirtualMachines/jdk-11.0.1.jdk/Contents/Home/lib/server/libjvm.dylib
  Referenced from: /Users/45050007/Library/R/3.6/library/rJava/libs/rJava.so
  Reason: image not found

This error would not affect staPLOT(), but it results in an error for staMR():

Error in J("au.edu.adelaide.fxmr.model.mr.MRProblemMaker") : 
  could not find function "J" 
michaelkalish commented 4 years ago

The package currently doesn't manage the connection between Rstudio and java, which is machine and version dependent. This is an open issue that we are trying to solve.