s-u / rJava

R to Java interface
https://RForge.net/rJava
235 stars 77 forks source link

rJava will not load. #193

Closed walinchus closed 5 years ago

walinchus commented 5 years ago

Please help. I have done like 20 things and none work. rJava will not load. Which I need for xlsx. Which I need for ImportExport. Which I need to run an mdb file in R.

I tried installling new versions of Java, I tried setting the directory of rJava to my current path, I tried restarting R, the whole shebang. Nothing works. Please help.

This is what I did in R:


install.packages("ImportExport")
also installing the dependencies ‘checkmate’, ‘rJava’, ‘xlsxjars’, ‘gtools’, ‘Formula’, ‘latticeExtra’, ‘acepack’, ‘gridExtra’, ‘htmlTable’, ‘viridis’, ‘xlsx’, ‘gdata’, ‘Hmisc’, ‘chron’, ‘RODBC’

trying URL 'https://cran.rstudio.com/bin/macosx/el-capitan/contrib/3.6/checkmate_1.9.4.tgz'
Content type 'application/x-gzip' length 714225 bytes (697 KB)
==================================================
downloaded 697 KB

trying URL 'https://cran.rstudio.com/bin/macosx/el-capitan/contrib/3.6/rJava_0.9-11.tgz'
Content type 'application/x-gzip' length 745354 bytes (727 KB)
==================================================
downloaded 727 KB

trying URL 'https://cran.rstudio.com/bin/macosx/el-capitan/contrib/3.6/xlsxjars_0.6.1.tgz'
Content type 'application/x-gzip' length 9493738 bytes (9.1 MB)
==================================================
downloaded 9.1 MB

trying URL 'https://cran.rstudio.com/bin/macosx/el-capitan/contrib/3.6/gtools_3.8.1.tgz'
Content type 'application/x-gzip' length 318769 bytes (311 KB)
==================================================
downloaded 311 KB

trying URL 'https://cran.rstudio.com/bin/macosx/el-capitan/contrib/3.6/Formula_1.2-3.tgz'
Content type 'application/x-gzip' length 178267 bytes (174 KB)
==================================================
downloaded 174 KB

trying URL 'https://cran.rstudio.com/bin/macosx/el-capitan/contrib/3.6/latticeExtra_0.6-28.tgz'
Content type 'application/x-gzip' length 2198048 bytes (2.1 MB)
==================================================
downloaded 2.1 MB

trying URL 'https://cran.rstudio.com/bin/macosx/el-capitan/contrib/3.6/acepack_1.4.1.tgz'
Content type 'application/x-gzip' length 81083 bytes (79 KB)
==================================================
downloaded 79 KB

trying URL 'https://cran.rstudio.com/bin/macosx/el-capitan/contrib/3.6/gridExtra_2.3.tgz'
Content type 'application/x-gzip' length 1103470 bytes (1.1 MB)
==================================================
downloaded 1.1 MB

trying URL 'https://cran.rstudio.com/bin/macosx/el-capitan/contrib/3.6/htmlTable_1.13.1.tgz'
Content type 'application/x-gzip' length 330341 bytes (322 KB)
==================================================
downloaded 322 KB

trying URL 'https://cran.rstudio.com/bin/macosx/el-capitan/contrib/3.6/viridis_0.5.1.tgz'
Content type 'application/x-gzip' length 1866383 bytes (1.8 MB)
==================================================
downloaded 1.8 MB

trying URL 'https://cran.rstudio.com/bin/macosx/el-capitan/contrib/3.6/xlsx_0.6.1.tgz'
Content type 'application/x-gzip' length 461752 bytes (450 KB)
==================================================
downloaded 450 KB

trying URL 'https://cran.rstudio.com/bin/macosx/el-capitan/contrib/3.6/gdata_2.18.0.tgz'
Content type 'application/x-gzip' length 1223792 bytes (1.2 MB)
==================================================
downloaded 1.2 MB

trying URL 'https://cran.rstudio.com/bin/macosx/el-capitan/contrib/3.6/Hmisc_4.2-0.tgz'
Content type 'application/x-gzip' length 3111493 bytes (3.0 MB)
==================================================
downloaded 3.0 MB

trying URL 'https://cran.rstudio.com/bin/macosx/el-capitan/contrib/3.6/chron_2.3-53.tgz'
Content type 'application/x-gzip' length 192920 bytes (188 KB)
==================================================
downloaded 188 KB

trying URL 'https://cran.rstudio.com/bin/macosx/el-capitan/contrib/3.6/RODBC_1.3-15.tgz'
Content type 'application/x-gzip' length 860293 bytes (840 KB)
==================================================
downloaded 840 KB

trying URL 'https://cran.rstudio.com/bin/macosx/el-capitan/contrib/3.6/ImportExport_1.1.tgz'
Content type 'application/x-gzip' length 139374 bytes (136 KB)
==================================================
downloaded 136 KB

The downloaded binary packages are in
    /var/folders/y9/l7s4rm2x0g934jww243w_mxh0000gn/T//Rtmp8dC80u/downloaded_packages
> View(counties)
> View(Cuyahoga_Mortgages_2016_to_2019)
> rm(addresses, addresses2, Amount_Due_Per_Tax_District, AthensRaw, Commercial_Properties, con, counties, CuyahogaApartments, CuyahogaGolfCourses, data, drv, LargestCuyahogaConveyanceFees, Looking_For_Sort_of_dupulicates, potential_outliers, property_records, tax_data, Tax_Rate_Comparison, Warren_Commerical_Properties)
> rm(pw)
> View(CuyahogaTransfers)
> rm(CuyahogaTransfers)
> View(TransferHistory)
> summary(TransferHistory$RECORDED_DATE)
   Length     Class      Mode 
  1048001 character character 
> summary(TransferHistory$Date_Recorded)
        Min.      1st Qu.       Median         Mean      3rd Qu.         Max. 
"1969-02-17" "1980-03-05" "1994-07-26" "1994-02-23" "2006-04-12" "2068-10-16" 
> colnames(TransferHistory)
 [1] "TRANSFER_TO_ID"               "WHS_ID"                       "TRANSFER_HISTORY_ID"          "TRANSFER_ORDER"              
 [5] "PARCEL_ID"                    "PROPERTY_NUMBER"              "GRANTEE1"                     "GRANTOR1"                    
 [9] "TRANSFER_DATE"                "SALES_AMOUNT"                 "DEED_TYPE"                    "INSTRUMENT_NUMBER"           
[13] "RECORDED_BOOK"                "RECORDED_PAGE"                "INSTRUMENT_TYPE"              "SALE_VALID"                  
[17] "MULTIPROPERTY_SALE"           "NUMBER_OF_PROPERTIES_IN_SALE" "CONVEYANCE_NUMBER"            "CONVEYANCE_FEE"              
[21] "USER_ID"                      "RECEIPT_NUMBER"               "AUTO_FILE_NUMBER"             "CHANGE_TIMESTAMP"            
[25] "TRANSFER_NUMBER"              "TRANSFER_STATUS"              "MONTH_OF_SALE"                "YEAR_OF_SALE"                
[29] "CAMA_SALE_FILE"               "CAMA_INV_FILE"                "TRANSFER_TYPE"                "INSTRUMENT_DATE"             
[33] "RECORDED_DATE"                "TRANSFER_FEE"                 "PERMISSIVE_FEE"               "AMOUNT_PAID"                 
[37] "FEE_PAID_BY"                  "FEE_CHECK_NUM"                "SALES_SOURCE"                 "DEED_NUMBER"                 
[41] "EXEMPTCODE"                   "ASSUMED_LOAN_AMOUNT"          "PERSONAL_PROPERTY_AMOUNT"     "BUILDINGS_ON_LAND"           
[45] "GIFT"                         "LAND_CONTRACT"                "LEASED_FEE"                   "LEASE_HOLD"                  
[49] "LIFE_ESTATE"                  "MINERAL_RIGHTS_RESERVED"      "MOTHER"                       "PARTINTER_EST_TRANSFERRED"   
[53] "GRANTOR_IS_MORTGAGEE"         "GRANTOR_IS_RELATIVE"          "TRADE"                        "TRANSFER_TYPE_DESCR"         
[57] "SALES_SOURCE_DESCR"           "EXEMPTCODE_DESCR"             "TRANSFER_FROM_PARCEL"         "UPDATE_DATE"                 
[61] "Date_Recorded"               
> View(Cuyahoga_Mortgages_2016_to_2019)
> summary(Cuyahoga_Mortgages_2016_to_2019$RecordedDate)
   Length     Class      Mode 
  1020514 character character 
> Cuyahoga_Mortgages_2016_to_2019$Date_Recorded <- dmy(Cuyahoga_Mortgages_2016_to_2019$RecordedDate)
Warning message:
 626805 failed to parse. 
> summary(Cuyahoga_Mortgages_2016_to_2019$Date_Recorded)
        Min.      1st Qu.       Median         Mean      3rd Qu.         Max.         NA's 
"2016-01-06" "2017-03-05" "2017-12-05" "2017-12-03" "2018-09-03" "2019-12-06"     "626805" 
> Cuyhoga_Auditors_Info <- access_import("Cuyahoga_Appraisal_01032019.mdb")
Error in access_import("Cuyahoga_Appraisal_01032019.mdb") : 
  could not find function "access_import"
> install.packages("ImportExport")
trying URL 'https://cran.rstudio.com/bin/macosx/el-capitan/contrib/3.6/ImportExport_1.1.tgz'
Content type 'application/x-gzip' length 139374 bytes (136 KB)
==================================================
downloaded 136 KB

The downloaded binary packages are in
    /var/folders/y9/l7s4rm2x0g934jww243w_mxh0000gn/T//Rtmp8dC80u/downloaded_packages
> Cuyhoga_Auditors_Info <- access_import("Cuyahoga_Appraisal_01032019.mdb")
Error in access_import("Cuyahoga_Appraisal_01032019.mdb") : 
  could not find function "access_import"
> Cuyhoga_Auditors_Info <- ImportExport::access_import("Cuyahoga_Appraisal_01032019.mdb")
Error: .onLoad failed in loadNamespace() for 'rJava', details:
  call: dyn.load(file, DLLpath = DLLpath, ...)
  error: unable to load shared object '/Library/Frameworks/R.framework/Versions/3.6/Resources/library/rJava/libs/rJava.so':
  dlopen(/Library/Frameworks/R.framework/Versions/3.6/Resources/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: /Library/Frameworks/R.framework/Versions/3.6/Resources/library/rJava/libs/rJava.so
  Reason: image not found
> library(ImportExport)
Loading required package: xlsx
Error: package or namespace load failed for ‘xlsx’:
 .onLoad failed in loadNamespace() for 'rJava', details:
  call: dyn.load(file, DLLpath = DLLpath, ...)
  error: unable to load shared object '/Library/Frameworks/R.framework/Versions/3.6/Resources/library/rJava/libs/rJava.so':
  dlopen(/Library/Frameworks/R.framework/Versions/3.6/Resources/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: /Library/Frameworks/R.framework/Versions/3.6/Resources/library/rJava/libs/rJava.so
  Reason: image not found
Error: package ‘xlsx’ could not be loaded
> Cuyhoga_Auditors_Info <- ImportExport::access_import("Cuyahoga_Appraisal_01032019.mdb")
Error: .onLoad failed in loadNamespace() for 'rJava', details:
  call: dyn.load(file, DLLpath = DLLpath, ...)
  error: unable to load shared object '/Library/Frameworks/R.framework/Versions/3.6/Resources/library/rJava/libs/rJava.so':
  dlopen(/Library/Frameworks/R.framework/Versions/3.6/Resources/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: /Library/Frameworks/R.framework/Versions/3.6/Resources/library/rJava/libs/rJava.so
  Reason: image not found
> library(Hmisc)
Loading required package: lattice
Loading required package: survival
Loading required package: Formula
Loading required package: ggplot2

Attaching package: ‘Hmisc’

The following objects are masked from ‘package:dplyr’:

    src, summarize

The following objects are masked from ‘package:base’:

    format.pval, units

> ??hmisc
> ??Hmisc.Overview
> ??Hmisc
> install.packages("mdbtools")
Warning in install.packages :
  package ‘mdbtools’ is not available (for R version 3.6.0)
> Cuyhoga_Auditors_Info <- Hmisc::mdb.get("Cuyahoga_Appraisal_01032019.mdb")
Error in system(paste("mdb-tables -1", file), intern = TRUE) : 
  error in running command
sh: mdb-tables: command not found
> library(mdbtools)
Error in library(mdbtools) : there is no package called ‘mdbtools’
> library(mdb-tools)
Error in library(mdb - tools) : 'package' must be of length 1
> install.packages("ImportExport")
trying URL 'https://cran.rstudio.com/bin/macosx/el-capitan/contrib/3.6/ImportExport_1.1.tgz'
Content type 'application/x-gzip' length 139374 bytes (136 KB)
==================================================
downloaded 136 KB

The downloaded binary packages are in
    /var/folders/y9/l7s4rm2x0g934jww243w_mxh0000gn/T//Rtmp8dC80u/downloaded_packages
> library(ImportExport)
Loading required package: xlsx
Error: package or namespace load failed for ‘xlsx’:
 .onLoad failed in loadNamespace() for 'rJava', details:
  call: dyn.load(file, DLLpath = DLLpath, ...)
  error: unable to load shared object '/Library/Frameworks/R.framework/Versions/3.6/Resources/library/rJava/libs/rJava.so':
  dlopen(/Library/Frameworks/R.framework/Versions/3.6/Resources/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: /Library/Frameworks/R.framework/Versions/3.6/Resources/library/rJava/libs/rJava.so
  Reason: image not found
Error: package ‘xlsx’ could not be loaded
> install.packages("xlsx")
trying URL 'https://cran.rstudio.com/bin/macosx/el-capitan/contrib/3.6/xlsx_0.6.1.tgz'
Content type 'application/x-gzip' length 461752 bytes (450 KB)
==================================================
downloaded 450 KB

The downloaded binary packages are in
    /var/folders/y9/l7s4rm2x0g934jww243w_mxh0000gn/T//Rtmp8dC80u/downloaded_packages
> install.packages("gdata", "chron", "RODBC")
Warning in install.packages :
  'lib = "chron"' is not writable
Would you like to use a personal library instead? (yes/No/cancel) cancel
Error in install.packages : unable to install packages
> install.packages("gdata","RODBC")
Warning in install.packages :
  'lib = "RODBC"' is not writable
Would you like to use a personal library instead? (yes/No/cancel) cancel
Error in install.packages : unable to install packages
> install.packages("ImportExport")
trying URL 'https://cran.rstudio.com/bin/macosx/el-capitan/contrib/3.6/ImportExport_1.1.tgz'
Content type 'application/x-gzip' length 139374 bytes (136 KB)
==================================================
downloaded 136 KB

The downloaded binary packages are in
    /var/folders/y9/l7s4rm2x0g934jww243w_mxh0000gn/T//Rtmp8dC80u/downloaded_packages
> library(ImportExport)
Loading required package: xlsx
Error: package or namespace load failed for ‘xlsx’:
 .onLoad failed in loadNamespace() for 'rJava', details:
  call: dyn.load(file, DLLpath = DLLpath, ...)
  error: unable to load shared object '/Library/Frameworks/R.framework/Versions/3.6/Resources/library/rJava/libs/rJava.so':
  dlopen(/Library/Frameworks/R.framework/Versions/3.6/Resources/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: /Library/Frameworks/R.framework/Versions/3.6/Resources/library/rJava/libs/rJava.so
  Reason: image not found
Error: package ‘xlsx’ could not be loaded
> library(xlsx)
Error: package or namespace load failed for ‘xlsx’:
 .onLoad failed in loadNamespace() for 'rJava', details:
  call: dyn.load(file, DLLpath = DLLpath, ...)
  error: unable to load shared object '/Library/Frameworks/R.framework/Versions/3.6/Resources/library/rJava/libs/rJava.so':
  dlopen(/Library/Frameworks/R.framework/Versions/3.6/Resources/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: /Library/Frameworks/R.framework/Versions/3.6/Resources/library/rJava/libs/rJava.so
  Reason: image not found
> install.packages("rJava")
trying URL 'https://cran.rstudio.com/bin/macosx/el-capitan/contrib/3.6/rJava_0.9-11.tgz'
Content type 'application/x-gzip' length 745354 bytes (727 KB)
==================================================
downloaded 727 KB

The downloaded binary packages are in
    /var/folders/y9/l7s4rm2x0g934jww243w_mxh0000gn/T//Rtmp8dC80u/downloaded_packages
> library(rJava)
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 '/Library/Frameworks/R.framework/Versions/3.6/Resources/library/rJava/libs/rJava.so':
  dlopen(/Library/Frameworks/R.framework/Versions/3.6/Resources/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: /Library/Frameworks/R.framework/Versions/3.6/Resources/library/rJava/libs/rJava.so
  Reason: image not found
> options("java.home"="/Library/Java/JavaVirtualMachines/jdk-9.0.4.jdk/Contents/Home/lib")
> 
> Sys.setenv(LD_LIBRARY_PATH='$JAVA_HOME/server')
> 
> dyn.load('/Library/Java/JavaVirtualMachines/jdk-9.0.4.jdk/Contents/Home/lib/server/libjvm.dylib')
Error in dyn.load("/Library/Java/JavaVirtualMachines/jdk-9.0.4.jdk/Contents/Home/lib/server/libjvm.dylib") : 
  unable to load shared object '/Library/Java/JavaVirtualMachines/jdk-9.0.4.jdk/Contents/Home/lib/server/libjvm.dylib':
  dlopen(/Library/Java/JavaVirtualMachines/jdk-9.0.4.jdk/Contents/Home/lib/server/libjvm.dylib, 6): image not found
> 
> library(rJava)
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 '/Library/Frameworks/R.framework/Versions/3.6/Resources/library/rJava/libs/rJava.so':
  dlopen(/Library/Frameworks/R.framework/Versions/3.6/Resources/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: /Library/Frameworks/R.framework/Versions/3.6/Resources/library/rJava/libs/rJava.so
  Reason: image not found
> 
> library(rJava)
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 '/Library/Frameworks/R.framework/Versions/3.6/Resources/library/rJava/libs/rJava.so':
  dlopen(/Library/Frameworks/R.framework/Versions/3.6/Resources/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: /Library/Frameworks/R.framework/Versions/3.6/Resources/library/rJava/libs/rJava.so
  Reason: image not found
> install.packages("rJava")
trying URL 'https://cran.rstudio.com/bin/macosx/el-capitan/contrib/3.6/rJava_0.9-11.tgz'
Content type 'application/x-gzip' length 745354 bytes (727 KB)
==================================================
downloaded 727 KB

The downloaded binary packages are in
    /var/folders/y9/l7s4rm2x0g934jww243w_mxh0000gn/T//Rtmp8dC80u/downloaded_packages
> library(rJava)
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 '/Library/Frameworks/R.framework/Versions/3.6/Resources/library/rJava/libs/rJava.so':
  dlopen(/Library/Frameworks/R.framework/Versions/3.6/Resources/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: /Library/Frameworks/R.framework/Versions/3.6/Resources/library/rJava/libs/rJava.so
  Reason: image not found
> library(rJava)
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 '/Library/Frameworks/R.framework/Versions/3.6/Resources/library/rJava/libs/rJava.so':
  dlopen(/Library/Frameworks/R.framework/Versions/3.6/Resources/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: /Library/Frameworks/R.framework/Versions/3.6/Resources/library/rJava/libs/rJava.so
  Reason: image not found

Restarting R session...

> library(rJava)
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 '/Library/Frameworks/R.framework/Versions/3.6/Resources/library/rJava/libs/rJava.so':
  dlopen(/Library/Frameworks/R.framework/Versions/3.6/Resources/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: /Library/Frameworks/R.framework/Versions/3.6/Resources/library/rJava/libs/rJava.so
  Reason: image not found
> install.packages("rJava")
trying URL 'https://cran.rstudio.com/bin/macosx/el-capitan/contrib/3.6/rJava_0.9-11.tgz'
Content type 'application/x-gzip' length 745354 bytes (727 KB)
==================================================
downloaded 727 KB

The downloaded binary packages are in
    /var/folders/y9/l7s4rm2x0g934jww243w_mxh0000gn/T//RtmpkGUoLr/downloaded_packages
> library(rJava)
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 '/Library/Frameworks/R.framework/Versions/3.6/Resources/library/rJava/libs/rJava.so':
  dlopen(/Library/Frameworks/R.framework/Versions/3.6/Resources/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: /Library/Frameworks/R.framework/Versions/3.6/Resources/library/rJava/libs/rJava.so
  Reason: image not found

Restarting R session...

> install.packages("rJava")
trying URL 'https://cran.rstudio.com/bin/macosx/el-capitan/contrib/3.6/rJava_0.9-11.tgz'
Content type 'application/x-gzip' length 745354 bytes (727 KB)
==================================================
downloaded 727 KB

The downloaded binary packages are in
    /var/folders/y9/l7s4rm2x0g934jww243w_mxh0000gn/T//RtmptRcxMj/downloaded_packages
> library(rJava)
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 '/Library/Frameworks/R.framework/Versions/3.6/Resources/library/rJava/libs/rJava.so':
  dlopen(/Library/Frameworks/R.framework/Versions/3.6/Resources/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: /Library/Frameworks/R.framework/Versions/3.6/Resources/library/rJava/libs/rJava.so
  Reason: image not found

Restarting R session...

> install.packages("rJava")
trying URL 'https://cran.rstudio.com/bin/macosx/el-capitan/contrib/3.6/rJava_0.9-11.tgz'
Content type 'application/x-gzip' length 745354 bytes (727 KB)
==================================================
downloaded 727 KB

The downloaded binary packages are in
    /var/folders/y9/l7s4rm2x0g934jww243w_mxh0000gn/T//RtmpbM1XaW/downloaded_packages
> library(rJava)
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 '/Library/Frameworks/R.framework/Versions/3.6/Resources/library/rJava/libs/rJava.so':
  dlopen(/Library/Frameworks/R.framework/Versions/3.6/Resources/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: /Library/Frameworks/R.framework/Versions/3.6/Resources/library/rJava/libs/rJava.so
  Reason: image not found
> options("java.home"="/Library/Java/JavaVirtualMachines/openjdk-12.0.1.jdk/Contents/Home/lib")
> Sys.setenv(LD_LIBRARY_PATH='$JAVA_HOME/server')
> dyn.load('/Library/Java/JavaVirtualMachines/openjdk-12.0.1.jdk/Contents/Home/lib/server/libjvm.dylib')
> library(rJava)
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 '/Library/Frameworks/R.framework/Versions/3.6/Resources/library/rJava/libs/rJava.so':
  dlopen(/Library/Frameworks/R.framework/Versions/3.6/Resources/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: /Library/Frameworks/R.framework/Versions/3.6/Resources/library/rJava/libs/rJava.so
  Reason: image not found

Restarting R session...

> install.packages("rJava")
trying URL 'https://cran.rstudio.com/bin/macosx/el-capitan/contrib/3.6/rJava_0.9-11.tgz'
Content type 'application/x-gzip' length 745354 bytes (727 KB)
==================================================
downloaded 727 KB

The downloaded binary packages are in
    /var/folders/y9/l7s4rm2x0g934jww243w_mxh0000gn/T//RtmpEGIQw4/downloaded_packages
> library(rJava)
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 '/Library/Frameworks/R.framework/Versions/3.6/Resources/library/rJava/libs/rJava.so':
  dlopen(/Library/Frameworks/R.framework/Versions/3.6/Resources/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: /Library/Frameworks/R.framework/Versions/3.6/Resources/library/rJava/libs/rJava.so
  Reason: image not found
> options("java.home"="/Library/Java/JavaVirtualMachines/openjdk-11.0.2.jdk/Contents/Home/lib")
> library(rJava)
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 '/Library/Frameworks/R.framework/Versions/3.6/Resources/library/rJava/libs/rJava.so':
  dlopen(/Library/Frameworks/R.framework/Versions/3.6/Resources/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: /Library/Frameworks/R.framework/Versions/3.6/Resources/library/rJava/libs/rJava.so
  Reason: image not found
> Sys.setenv(LD_LIBRARY_PATH='$JAVA_HOME/server')
> dyn.load('/Library/Java/JavaVirtualMachines/openjdk-11.0.2.jdk/Contents/Home/lib/server/libjvm.dylib')
> library(rJava)
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 '/Library/Frameworks/R.framework/Versions/3.6/Resources/library/rJava/libs/rJava.so':
  dlopen(/Library/Frameworks/R.framework/Versions/3.6/Resources/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: /Library/Frameworks/R.framework/Versions/3.6/Resources/library/rJava/libs/rJava.so
  Reason: image not found
> ?options
> options("java.home")
$java.home
[1] "/Library/Java/JavaVirtualMachines/openjdk-11.0.2.jdk/Contents/Home/lib"

> ?rJava
No documentation for ‘rJava’ in specified packages and libraries:
you could try ‘??rJava’
> ??rJava
> getProperties("java.home")
Error: 'getProperties' is defunct.
See help("Defunct")
> getProperty("java.home")
Error in getProperty("java.home") : could not find function "getProperty"
> Sys.setenv(JAVA_HOME="/Library/Java/JavaVirtualMachines/openjdk-11.0.2.jdk")
> library(rJava)
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 '/Library/Frameworks/R.framework/Versions/3.6/Resources/library/rJava/libs/rJava.so':
  dlopen(/Library/Frameworks/R.framework/Versions/3.6/Resources/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: /Library/Frameworks/R.framework/Versions/3.6/Resources/library/rJava/libs/rJava.so
  Reason: image not found
> install.packages("xlsx")
trying URL 'https://cran.rstudio.com/bin/macosx/el-capitan/contrib/3.6/xlsx_0.6.1.tgz'
Content type 'application/x-gzip' length 461752 bytes (450 KB)
==================================================
downloaded 450 KB

The downloaded binary packages are in
    /var/folders/y9/l7s4rm2x0g934jww243w_mxh0000gn/T//RtmpEGIQw4/downloaded_packages
> library(xlsx)
Error: package or namespace load failed for ‘xlsx’:
 .onLoad failed in loadNamespace() for 'rJava', details:
  call: dyn.load(file, DLLpath = DLLpath, ...)
  error: unable to load shared object '/Library/Frameworks/R.framework/Versions/3.6/Resources/library/rJava/libs/rJava.so':
  dlopen(/Library/Frameworks/R.framework/Versions/3.6/Resources/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: /Library/Frameworks/R.framework/Versions/3.6/Resources/library/rJava/libs/rJava.so
  Reason: image not found

And this is what I did simultaneously pretty much in my terminal window:

Last login: Sat Jun 29 23:47:08 on console
Daddy-Mac-418:~ Lucia$ sudo R CMD javareconf
Password:
Java interpreter : /usr/bin/java
Java version     : 1.6.0_65
Java home path   : /Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
Java compiler    : /usr/bin/javac
Java headers gen.: /usr/bin/javah
Java archive tool: /usr/bin/jar

trying to compile and link a JNI program 
detected JNI cpp flags    : 
detected JNI linker flags : -L/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Libraries -ljvm
clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG   -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include  -fPIC  -Wall -g -O2  -c conftest.c -o conftest.o
conftest.c:1:10: fatal error: 'jni.h' file not found
#include <jni.h>
         ^~~~~~~
1 error generated.
make: *** [conftest.o] Error 1
Unable to compile a JNI program

JAVA_HOME        : /Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
Java library path: 
JNI cpp flags    : 
JNI linker flags : 
Updating Java configuration in /Library/Frameworks/R.framework/Resources
Done.

Daddy-Mac-418:~ Lucia$ sudo ln -f -s $(/usr/libexec/java_home)/jre/lib/server/libjvm.dylib /usr/local/lib
Daddy-Mac-418:~ Lucia$ java -version
java version "1.6.0_65"
Java(TM) SE Runtime Environment (build 1.6.0_65-b14-468)
Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-468, mixed mode)
Daddy-Mac-418:~ Lucia$ brew cask install java11
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 3 taps (homebrew/core, homebrew/cask and homebrew/services).
==> New Formulae
aliyun-cli                               k3d
allureofthestars                         k6
anime-downloader                         kahip
antibody                                 kim-api
appstream-glib                           ktlint
atlantis                                 kubeaudit
boringtun                                lazygit
breezy                                   leela-zero
catch2                                   libevhtp
cfn-lint                                 libgr
cjson                                    libsixel
clojure-lsp                              libzt
clzip                                    lizard
cmix                                     mariadb@10.3
contentful-cli                           molten-vk
cpp-gsl                                  netlify-cli
cql                                      newman
csound                                   nlohmann-json
csvq                                     openkim-models
cubelib                                  ospray
cxxopts                                  osqp
cypher-shell                             otf2
dbmate                                   phpstan
deno                                     pipx
devspace                                 pprint
docker-machine-driver-vmware             procs
drone-cli                                proteinortho
dust                                     scala@2.12
embree                                   scdoc
erlang@21                                scws
fasttext                                 sk
faudio                                   spice-gtk
frpc                                     spirv-tools
frps                                     swig@3
gatsby-cli                               termshark
gcc@8                                    terraform@0.11
gel                                      terraformer
heatshrink                               terrahub
helmsman                                 vapoursynth-imwri
hey                                      vapoursynth-ocr
include-what-you-use                     vapoursynth-sub
inlets                                   virgil
ipopt                                    volt
itk                                      yapf
janet                                    zabbix-cli
==> Updated Formulae
cairo ✔                                  liblqr
ffmpeg ✔                                 libltc
freetype ✔                               liblunar
gettext ✔                                libmagic
ghostscript ✔                            libmatroska
gifsicle ✔                               libmicrohttpd
git ✔                                    libmp3splt
glib ✔                                   libmpd
gnutls ✔                                 libmpdclient
harfbuzz ✔                               libmspub
icu4c ✔                                  libmtp
imagemagick ✔                            libmwaw
libbluray ✔                              libmypaint
libevent ✔                               libnfs
libpng ✔                                 libnice
node ✔                                   libnids
openjpeg ✔                               libnotify
openssl ✔                                libntlm
opus ✔                                   libodfgen
p11-kit ✔                                libofx
pixman ✔                                 libomp
postgresql ✔                             libopenmpt
qt ✔                                     libosinfo
readline ✔                               libpeas
sqlite ✔                                 libphonenumber
unbound ✔                                libpq
xpdf ✔                                   libpqxx
abyss                                    libprotoident
ace                                      libpsl
ack                                      libpst
acpica                                   libpulsar
agda                                     libqalculate
aide                                     libquicktime
akamai                                   librasterlite
akka                                     librdkafka
algernon                                 libre
allure                                   librealsense
alot                                     librem
amazon-ecs-cli                           libressl
ammonite-repl                            librest
amqp-cpp                                 librsvg
amtk                                     libsass
angle-grinder                            libsecret
angular-cli                              libshout
anjuta                                   libsigc++
annie                                    libsmf
ansible                                  libsodium
ansifilter                               libsoup
ant                                      libspectre
ant@1.9                                  libspectrum
anyenv                                   libssh
apache-archiva                           libssh2
apache-arrow-glib                        libsvm
apache-drill                             libswiften
apache-flink                             libtorrent-rasterbar
apache-geode                             libtrace
apache-spark                             libuninameslist
app-engine-python                        libuv
apr                                      libvirt
apt-dater                                libvirt-glib
aptly                                    libvisio
aqbanking                                libvmaf
arangodb                                 libwpd
aravis                                   libwpg
argon2                                   libxc
argyll-cms                               libxlsxwriter
armadillo                                libxml++
arpack                                   libxml++3
artifactory                              libxo
asciidoctor                              libzdb
asciidoctorj                             lighttpd
asdf                                     lilv
ask-cli                                  linkerd
aspectj                                  links
astrometry-net                           lldpd
atari800                                 llvm
atk                                      lmod
atkmm                                    lnav
atlassian-cli                            logstash
atomist-cli                              logtalk
audacious                                lolcat
auditbeat                                loudmouth
augeas                                   lsd
autojump                                 luarocks
autopep8                                 lumo
autorest                                 lv2
avra                                     lwtools
avro-c                                   lxc
avro-cpp                                 lynis
avro-tools                               lysp
awf                                      lz4
aws-iam-authenticator                    lzip
aws-okta                                 mackup
aws-sdk-cpp                              macvim
awscli                                   mafft
axel                                     magic-wormhole
azure-cli                                mailutils
azure-storage-cpp                        mame
b2-tools                                 mapnik
babel                                    mariadb
babl                                     mariadb-connector-c
badtouch                                 mariadb@10.1
balena-cli                               mariadb@10.2
ballerina                                mat2
baobab                                   math-comp
bartycrouch                              maven
basex                                    maxima
bash                                     maxwell
bat                                      mbedtls
bazel                                    mcabber
bdw-gc                                   mdbook
beanstalkd                               mdbtools
bear                                     mdds
bedops                                   mdk
bee                                      media-info
bettercap                                mednafen
bgpstream                                megatools
binaryen                                 memcached
bind                                     mercurial
binwalk                                  mesa
bison                                    meson
bit                                      mesos
bitcoin                                  metabase
bitlbee                                  metaproxy
bitrise                                  metricbeat
bitwarden-cli                            mgba
blast                                    micronaut
blink1                                   micropython
bluepill                                 midgard2
bookloupe                                midnight-commander
boost                                    mighttpd2
boost-bcp                                mikutter
boost-build                              mill
boost-mpi                                mimic
boost-python                             minbif
boost-python3                            minetest
botan                                    mingw-w64
bowtie2                                  minimal-racket
braid                                    minio
btfs                                     minio-mc
buildifier                               minizinc
buildkit                                 mk-configure
buku                                     mkl-dnn
bundletool                               mksh
bwfmetaedit                              mkvtoolnix
byobu                                    mlkit
byteman                                  mlt
bzip2                                    mmark
bzt                                      mmseqs2
cadaver                                  modules
caffe                                    molecule
calcurse                                 monero
calicoctl                                monetdb
camlp4                                   mongo-c-driver
cargo-completion                         mongoose
carla                                    mono
carthage                                 mono-libgdiplus
castxml                                  mosquitto
cataclysm                                most
catimg                                   mp3splt
cattle                                   mpck
cc65                                     mpd
ccache                                   mpdscribble
ccextractor                              mpich
ccls                                     mplayer
center-im                                mpop
certbot                                  mps-youtube
cf4ocl                                   mruby
cfengine                                 msgpack
cfr-decompiler                           msitools
cfssl                                    msktutil
cgal                                     msmtp
cgit                                     mtools
cglm                                     mu
cgrep                                    mujs
chafa                                    mupdf
chakra                                   mupdf-tools
chamber                                  mutt
charm                                    mvnvm
checkbashisms                            mypy
checkstyle                               mysql
chicken                                  mysql@5.7
chrome-export                            mysqltuner
chronograf                               n
cimg                                     nagios
circleci                                 nano
citus                                    nanopb-generator
cjdns                                    nativefier
clang-format                             nats-streaming-server
clhep                                    nave
cloc                                     ncdc
clojure                                  ncmpc
clozure-cl                               ncmpcpp
clutter                                  nco
clutter-gst                              ndpi
clutter-gtk                              needle
cmake                                    neo4j
cmark                                    neomutt
cmark-gfm                                neovim
cmocka                                   netcdf
cockroach                                netdata
cocoapods                                nethack
coffeescript                             netpbm
cogl                                     newsboat
cointop                                  newt
collectd                                 nexus
collector-sidecar                        nghttp2
commandbox                               nginx
composer                                 nifi
conan                                    nifi-registry
confluent-oss                            nim
conserver                                nlopt
consul                                   nnn
convox                                   node-build
coq                                      node@10
corectl                                  node@8
corsixth                                 node_exporter
couchdb                                  nodenv
cp2k                                     nomad
cpansearch                               nordugrid-arc
cppad                                    noti
cppcheck                                 notmuch
cpprestsdk                               nsd
cracklib                                 nss
crc32c                                   ntfs-3g
creduce                                  ntl
cromwell                                 numpy
crosstool-ng                             nwchem
crowdin                                  nzbget
cryfs                                    ocaml-num
cryptol                                  ocamlbuild
crystal                                  ocrmypdf
crystal-icr                              octave
ctl                                      odpi
cucumber-cpp                             ola
curl                                     ompl
curl-openssl                             oniguruma
curlftpfs                                opa
cutter                                   opam
cython                                   open-mpi
dartsim                                  openapi-generator
datetime-fortran                         openblas
dav1d                                    opencascade
davix                                    opencc
dbhash                                   opencoarrays
dbus-glib                                opencolorio
dc3dd                                    openconnect
dcd                                      opencv
dcm2niix                                 opencv@2
dcos-cli                                 opencv@3
dehydrated                               openexr
dep                                      openfortivpn
dependency-check                         openh264
desktop-file-utils                       openimageio
dfc                                      openrct2
dfmt                                     openshift-cli
dhall                                    openslide
dhall-json                               openssh
diff-pdf                                 openssl@1.1
diff-so-fancy                            opensubdiv
diffoscope                               openttd
digdag                                   openvdb
direnv                                   openvpn
dita-ot                                  operator-sdk
django-completion                        orbit
dmd                                      orc-tools
dnscontrol                               osc
dnscrypt-proxy                           oscats
dnstwist                                 osm-gps-map
docfx                                    osm2pgrouting
docker                                   osmosis
docker-completion                        osquery
docker-compose                           osrm-backend
docker-compose-completion                overmind
docker-credential-helper                 owfs
docker-credential-helper-ecr             oxipng
docker-machine-driver-xhyve              pacapt
doctl                                    packer
doitlive                                 packmol
dopewars                                 paket
double-conversion                        pam-u2f
dovecot                                  pandoc
druid                                    pandoc-crossref
dscanner                                 pango
dspdfviewer                              pangomm
dub                                      paperkey
duc                                      paps
duck                                     parallel
dungeon                                  parallelstl
duo_unix                                 pari
dwdiff                                   passenger
dynare                                   patchelf
e2fsprogs                                payara
easy-tag                                 pazpar2
easyengine                               pbrt
eccodes                                  pcapplusplus
efl                                      pcb
eiffelstudio                             pcb2gcode
elasticsearch                            pcl
elasticsearch@5.6                        pcre2
elixir                                   pdal
emacs                                    pdf2htmlex
emscripten                               pdf2svg
encfs                                    pdfgrep
enchant                                  pdfpc
enigma                                   pdftoipe
enscript                                 pdns
envconsul                                pdnsrec
epubcheck                                peg-markdown
erlang                                   pegtl
erlang@19                                percona-xtrabackup
erlang@20                                perl
eslint                                   peru
etcd                                     petsc
ethereum                                 petsc-complex
etl                                      pgbadger
ettercap                                 pgcli
evince                                   pgformatter
exercism                                 pgplot
exiftool                                 pgrouting
exiv2                                    phoronix-test-suite
expat                                    php
exploitdb                                php-code-sniffer
eye-d3                                   php-cs-fixer
f3                                       php@7.1
faas-cli                                 php@7.2
fastme                                   phpmyadmin
fceux                                    phpunit
ffsend                                   physfs
fftw                                     picard-tools
fibjs                                    picat
field3d                                  pick
file-formula                             pidgin
file-roller                              pijul
fio                                      pilosa
firebase-cli                             pinboard-notes-backup
flatbuffers                              pinfo
flex                                     pioneers
flintrock                                pius
flow                                     planck
fluid-synth                              plantuml
fluxctl                                  platformio
fn                                       plplot
fobis                                    plzip
folly                                    pmd
fontforge                                pms
fonttools                                pngquant
fourstore                                pod2man
fq                                       podofo
freeciv                                  ponyc
freedink                                 poppler
freeling                                 postgis
freeradius-server                        postgresql@10
freetds                                  postgresql@9.4
frugal                                   postgresql@9.5
fs-uae                                   postgresql@9.6
fselect                                  postgrest
fuse-emulator                            pqiv
fuseki                                   pre-commit
futhark                                  prefixsuffix
fx                                       presto
gabedit                                  prettier
galen                                    privoxy
gammaray                                 profanity
gammu                                    proguard
gandi.cli                                proj
gauge                                    prometheus
gawk                                     protobuf-c
gbdfed                                   protoc-gen-go
gcab                                     prototool
gcc                                      pspg
gcc@5                                    psql2csv
gcc@6                                    pstoedit
gcc@7                                    pulumi
gcsfuse                                  pumba
gdal                                     pure-ftpd
gdb                                      purescript
gdcm                                     pushpin
gdk-pixbuf                               putty
gdl                                      py2cairo
gdmap                                    py3cairo
gearsystem                               pybind11
gecode                                   pyenv
geeqie                                   pygobject
gegl                                     pygobject3
genact                                   pygtk
gengetopt                                pygtkglext
genometools                              pygtksourceview
geoipupdate                              pypy
geos                                     pypy3
gerbv                                    pyside
getdns                                   qalculate-gtk
gexiv2                                   qbs
ghc                                      qca
ghex                                     qd
ghq                                      qemu
ghr                                      qmmp
gibo                                     qpdf
git-cinnabar                             qrupdate
git-cola                                 quantlib
git-flow-avh                             quazip
git-fresh                                quicktype
git-ftp                                  quilt
git-lfs                                  qwt
git-quick-stats                          r
git-recent                               rabbitmq
git-remote-hg                            radare2
git-review                               rancid
git-secret                               range-v3
git-town                                 rawtoaces
gitbucket                                raylib
gitfs                                    rbspy
gitg                                     rclone
gitlab-runner                            rdesktop
gitleaks                                 rdup
gitless                                  re2
gjs                                      reattach-to-user-namespace
gkrellm                                  rebar3
glade                                    recode
glances                                  recon-ng
glfw                                     recoverjpeg
glib-networking                          redis
glibmm                                   redo
glm                                      redshift
glooctl                                  remind
glslang                                  reposurgeon
glyr                                     reprepro
gmic                                     restic
gmime                                    restview
gmsh                                     rhino
gmt                                      riemann
gnome-autoar                             riff
gnome-builder                            ripgrep
gnome-latex                              rke
gnome-recipes                            rmlint
gnome-themes-standard                    rocksdb
gnu-getopt                               roll
gnu-indent                               rom-tools
gnu-typist                               root
gnu-units                                roswell
gnumeric                                 rpm
gnunet                                   rrdtool
gnupg                                    rsyslog
gnuplot                                  rt-audio
gnuradio                                 rtags
go                                       rtmidi
goaccess                                 rtv
gobby                                    ruby
gobject-introspection                    ruby-build
gobuster                                 ruby@2.4
godep                                    rust
goffice                                  rustup-init
golang-migrate                           s-nail
gollum                                   s-search
golo                                     salt
gom                                      sassc
gomplate                                 saxon
goocanvas                                sbcl
goofys                                   scala
google-authenticator-libpam              scalapack
google-benchmark                         scalariform
googler                                  sccache
gopass                                   sceptre
gor                                      schismtracker
goreleaser                               scipy
gosu                                     scmpuff
gox                                      scons
gpa                                      scrcpy
gpac                                     scrollkeeper
gpgme                                    sd
gpredict                                 sdb
gpsbabel                                 sdcc
gpsim                                    sdcv
gqview                                   sdl2_ttf
gr-osmosdr                               sec
gradio                                   serd
gradle                                   serf
grafana                                  serve
grails                                   serverless
grakn                                    sfcgal
graph-tool                               shadowsocks-libev
graphene                                 shared-mime-info
graphviz                                 shc
grib-api                                 shfmt
gromacs                                  ship
groovy                                   shogun
groovysdk                                shpotify
grpc                                     shyaml
grpcurl                                  sile
grsync                                   silk
gsmartcontrol                            simple-scan
gspell                                   simple-tiles
gssdp                                    sipp
gst-editing-services                     sipsak
gst-libav                                siril
gst-plugins-bad                          skaffold
gst-plugins-base                         skktools
gst-plugins-good                         skopeo
gst-plugins-ugly                         sleepwatcher
gst-python                               sleuthkit
gst-rtsp-server                          smali
gst-validate                             smimesign
gstreamer                                sn0int
gstreamermm                              snapcraft
gtk+                                     snownews
gtk+3                                    socat
gtk-chtheme                              sofia-sip
gtk-doc                                  solr
gtk-gnutella                             solr@7.7
gtk-mac-integration                      sonar-scanner
gtk-vnc                                  sonarqube
gtkdatabox                               sonobuoy
gtkextra                                 sops
gtkglext                                 source-highlight
gtkmm                                    source-to-image
gtkmm3                                   sourcekitten
gtksourceview                            sourcery
gtksourceview3                           spades
gtksourceview4                           sparse
gtksourceviewmm                          sphinx-doc
gtksourceviewmm3                         spice-protocol
gtkspell3                                spin
gtranslator                              spirv-cross
gts                                      sqlcipher
gucharmap                                sqldiff
guile                                    sqlite-analyzer
gupnp                                    sqlmap
gupnp-av                                 sratom
gupnp-tools                              srt
gwenhywfar                               ssh-copy-id
gwyddion                                 sshfs
gx                                       sshguard
gxml                                     sshtrix
h3                                       sslh
hadolint                                 sslscan
hadoop                                   sslsplit
hamlib                                   stellar-core
hana                                     step
hapi-fhir-cli                            stern
haproxy                                  stk
haskell-stack                            stout
hatari                                   streamripper
hbase                                    strongswan
hdf5                                     stubby
hdf5@1.8                                 stunnel
hebcal                                   subversion
heimdal                                  suil
helmfile                                 suite-sparse
herrie                                   sundials
hexyl                                    superlu
hfstospell                               supervisor
highlight                                svgo
hivemind                                 swagger-codegen
hledger                                  swagger-codegen@2
hlint                                    swi-prolog
homeassistant-cli                        swift-protobuf
homebank                                 swiftformat
hopenpgp-tools                           swiftlint
howdoi                                   swig
htmlcxx                                  swimat
http-parser                              sylpheed
httpd                                    sync_gateway
httping                                  syncthing
hub                                      synfig
hugo                                     sysbench
hunspell                                 talloc
hydra                                    tarantool
hyperfine                                taskell
hyperkit                                 tass64
hyperscan                                tbb
hypre                                    tcpreplay
i2p                                      tcsh
i2pd                                     tdlib
iamy                                     tectonic
ibex                                     teleconsole
icecream                                 telegraf
idnits                                   teleport
igv                                      template-glib
ilmbase                                  tepl
imagemagick@6                            termtosvg
imageoptim-cli                           terraform
imake                                    terraform_landscape
imapsync                                 terraforming
influxdb                                 terragrunt
iniparser                                testssl
interactive-rebase-tool                  texmath
ios-sim                                  tfenv
ios-webkit-debug-proxy                   tgui
iozone                                   thefuck
ipbt                                     thors-serializer
iperf3                                   tiger-vnc
ipfs                                     tika
ipv6calc                                 tile38
ipython                                  tippecanoe
ircii                                    tkdiff
irssi                                    tmux
isl                                      tmux-xpanes
ispc                                     tmuxinator-completion
istioctl                                 tokei
itstool                                  tomcat
ivykis                                   tomcat@7
jadx                                     tomcat@8
jailkit                                  tomee-plus
jbig2dec                                 tomee-webprofile
jboss-forge                              topgrade
jdnssec-tools                            tor
jdupes                                   torsocks
jemalloc                                 tox
jena                                     traefik
jenkins                                  trafficserver
jenkins-job-builder                      translate-shell
jenkins-lts                              travis
jetty                                    treefrog
jfrog-cli-go                             trezor-agent
jhiccup                                  triton
jhipster                                 ttfautohint
jid                                      ttyd
jigdo                                    tundra
jmeter                                   txr
jmxterm                                  typescript
jnettop                                  u-boot-tools
john                                     ucloud
joplin                                   ufraw
jp2a                                     uhd
jruby                                    ultralist
jsdoc3                                   uncrustify
json-fortran                             ungit
json-glib                                unp64
json_spirit                              unrar
jsonnet                                  unzip
jsonschema2pojo                          upscaledb
juju                                     urbit
jump                                     urdfdom_headers
just                                     userspace-rcu
jvgrep                                   utf8proc
kafka                                    util-linux
kafkacat                                 utimer
kallisto                                 uwsgi
kapacitor                                v8
khal                                     vagrant-completion
khard                                    vala
kibana                                   valabind
kibana@5.6                               vamp-plugin-sdk
kitchen-sync                             vapoursynth
klavaro                                  varnish
knot                                     vault
knot-resolver                            vault-cli
kobalt                                   vcdimager
kops                                     vegeta
kore                                     velero
kotlin                                   verilator
krakend                                  vert.x
krb5                                     vfuse
kube-aws                                 vice
kubecfg                                  viewvc
kubeless                                 vim
kubeprod                                 vim@7.4
kubernetes-cli                           vips
kubernetes-helm                          visp
kubernetes-service-catalog-client        vnstat
kustomize                                vowpal-wabbit
kyoto-cabinet                            vte
kyoto-tycoon                             vte3
lablgtk                                  vtk
lammps                                   vulkan-headers
landscaper                               vultr
lapack                                   wabt
lasi                                     wandio
lasso                                    wartremover
lastpass-cli                             watchexec
laszip                                   wdfs
latex2html                               wdiff
latexml                                  weaver
lbdb                                     webdis
lcdf-typetools                           webpack
ldapvi                                   websocat
ldc                                      websocketd
ledger                                   webtorrent-cli
lego                                     weechat
lensfun                                  wesnoth
leveldb                                  wget
lf                                       whois
lgogdownloader                           widelands
libatomic_ops                            wildfly-as
libb2                                    wimlib
libbi                                    wine
libbitcoin                               winetricks
libbitcoin-blockchain                    wiredtiger
libbitcoin-client                        wireguard-go
libbitcoin-database                      wireguard-tools
libbitcoin-explorer                      wiremock-standalone
libbitcoin-network                       wireshark
libbitcoin-node                          wla-dx
libbitcoin-protocol                      wmctrl
libbitcoin-server                        wp-cli
libcddb                                  wp-cli-completion
libcdio                                  wtf
libcdr                                   wv
libchamplain                             wxmaxima
libcoap                                  wxpython
libcroco                                 xboard
libdap                                   xcodegen
libdazzle                                xctool
libdc1394                                xmake
libebml                                  xmrig
libedit                                  xonsh
liberasurecode                           xplanet
libestr                                  xsane
libetonyek                               xsimd
libev                                    yaf
libfabric                                yamllint
libfixbuf                                yara
libgaiagraphics                          yarn
libgda                                   yash
libgdata                                 yaz
libgee                                   yelp-tools
libgeotiff                               ykman
libgit2                                  ykpers
libgit2-glib                             yle-dl
libglade                                 you-get
libglademm                               youtube-dl
libgnomecanvas                           yq
libgnomecanvasmm                         yubico-piv-tool
libgphoto2                               z3
libgsf                                   zabbix
libgtop                                  zebra
libgweather                              zenity
libhttpseverywhere                       zeromq
libical                                  zig
libiconv                                 zim
libidl                                   zimg
libidn2                                  zlog
libimagequant                            znc
libinfinity                              zola
libiptcdata                              zorba
libjson-rpc-cpp                          zsh-autosuggestions
libjwt                                   zshdb
liblas                                   zstd
liblcf                                   zurl
liblinear
==> Renamed Formulae
gnatsd -> nats-server
==> Deleted Formulae
compose2kube        js-test-driver      safe                varnish@4
dsd                 minisat             scala@2.10          whirr
erlang@18           node@6              smlnj               xmoto
gtk-engines         pdftoedn            swig@3.04
gtk-murrine-engine  rlvm                tomcat@6
guile@2.0           ruby@2.3            typesafe-activator

Error: Cask 'java11' is unavailable: No Cask with this name exists.
Daddy-Mac-418:~ Lucia$ sudo R CMD javareconf
Password:
Java interpreter : /usr/bin/java
Java version     : 1.6.0_65
Java home path   : /Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
Java compiler    : /usr/bin/javac
Java headers gen.: /usr/bin/javah
Java archive tool: /usr/bin/jar

trying to compile and link a JNI program 
detected JNI cpp flags    : 
detected JNI linker flags : -L/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Libraries -ljvm
clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG   -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include  -fPIC  -Wall -g -O2  -c conftest.c -o conftest.o
conftest.c:1:10: fatal error: 'jni.h' file not found
#include <jni.h>
         ^~~~~~~
1 error generated.
make: *** [conftest.o] Error 1
Unable to compile a JNI program

JAVA_HOME        : /Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
Java library path: 
JNI cpp flags    : 
JNI linker flags : 
Updating Java configuration in /Library/Frameworks/R.framework/Resources
Done.

Daddy-Mac-418:~ Lucia$ sudo ln -f -s $(/usr/libexec/java_home)/jre/lib/server/libjvm.dylib/usr/local/lib
Daddy-Mac-418:~ Lucia$ sudo R CMD javareconf
Password:
Java interpreter : /usr/bin/java
Java version     : 1.8.0_211
Java home path   : /Library/Java/JavaVirtualMachines/jdk1.8.0_211.jdk/Contents/Home/jre
Java compiler    : /usr/bin/javac
Java headers gen.: /usr/bin/javah
Java archive tool: /usr/bin/jar

trying to compile and link a JNI program 
detected JNI cpp flags    : -I$(JAVA_HOME)/../include -I$(JAVA_HOME)/../include/darwin
detected JNI linker flags : -L$(JAVA_HOME)/lib/server -ljvm
clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/Library/Java/JavaVirtualMachines/jdk1.8.0_211.jdk/Contents/Home/jre/../include -I/Library/Java/JavaVirtualMachines/jdk1.8.0_211.jdk/Contents/Home/jre/../include/darwin  -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include  -fPIC  -Wall -g -O2  -c conftest.c -o conftest.o
clang -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/Library/Frameworks/R.framework/Resources/lib -L/usr/local/lib -o conftest.so conftest.o -L/Library/Java/JavaVirtualMachines/jdk1.8.0_211.jdk/Contents/Home/jre/lib/server -ljvm -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation

JAVA_HOME        : /Library/Java/JavaVirtualMachines/jdk1.8.0_211.jdk/Contents/Home/jre
Java library path: $(JAVA_HOME)/lib/server
JNI cpp flags    : -I$(JAVA_HOME)/../include -I$(JAVA_HOME)/../include/darwin
JNI linker flags : -L$(JAVA_HOME)/lib/server -ljvm
Updating Java configuration in /Library/Frameworks/R.framework/Resources
Done.

Daddy-Mac-418:~ Lucia$ sudo R CMD javareconf
Password:
Java interpreter : /usr/bin/java
Java version     : 1.8.0_211
Java home path   : /Library/Java/JavaVirtualMachines/jdk1.8.0_211.jdk/Contents/Home/jre
Java compiler    : /usr/bin/javac
Java headers gen.: /usr/bin/javah
Java archive tool: /usr/bin/jar

trying to compile and link a JNI program 
detected JNI cpp flags    : -I$(JAVA_HOME)/../include -I$(JAVA_HOME)/../include/darwin
detected JNI linker flags : -L$(JAVA_HOME)/lib/server -ljvm
clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/Library/Java/JavaVirtualMachines/jdk1.8.0_211.jdk/Contents/Home/jre/../include -I/Library/Java/JavaVirtualMachines/jdk1.8.0_211.jdk/Contents/Home/jre/../include/darwin  -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include  -fPIC  -Wall -g -O2  -c conftest.c -o conftest.o
clang -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/Library/Frameworks/R.framework/Resources/lib -L/usr/local/lib -o conftest.so conftest.o -L/Library/Java/JavaVirtualMachines/jdk1.8.0_211.jdk/Contents/Home/jre/lib/server -ljvm -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation

JAVA_HOME        : /Library/Java/JavaVirtualMachines/jdk1.8.0_211.jdk/Contents/Home/jre
Java library path: $(JAVA_HOME)/lib/server
JNI cpp flags    : -I$(JAVA_HOME)/../include -I$(JAVA_HOME)/../include/darwin
JNI linker flags : -L$(JAVA_HOME)/lib/server -ljvm
Updating Java configuration in /Library/Frameworks/R.framework/Resources
Done.

Daddy-Mac-418:~ Lucia$ java -version
java version "1.8.0_211"
Java(TM) SE Runtime Environment (build 1.8.0_211-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.211-b12, mixed mode)
Daddy-Mac-418:~ Lucia$ brew cask install java11
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 2 taps (homebrew/core and homebrew/cask).
==> Updated Formulae
ask-cli                                  go
balena-cli                               godep
binaryen                                 mill
diffoscope                               netdata
dmd                                      osc
docker-credential-helper-ecr             pgbouncer
dpkg                                     typescript
eccodes                                  ungit
fasttext                                 vulkan-headers
faudio

Error: Cask 'java11' is unavailable: No Cask with this name exists.
Daddy-Mac-418:~ Lucia$ sudo R CMD javareconf
Password:
Java interpreter : /usr/bin/java
Java version     : 1.8.0_211
Java home path   : /Library/Java/JavaVirtualMachines/jdk1.8.0_211.jdk/Contents/Home/jre
Java compiler    : /usr/bin/javac
Java headers gen.: /usr/bin/javah
Java archive tool: /usr/bin/jar

trying to compile and link a JNI program 
detected JNI cpp flags    : -I$(JAVA_HOME)/../include -I$(JAVA_HOME)/../include/darwin
detected JNI linker flags : -L$(JAVA_HOME)/lib/server -ljvm
clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/Library/Java/JavaVirtualMachines/jdk1.8.0_211.jdk/Contents/Home/jre/../include -I/Library/Java/JavaVirtualMachines/jdk1.8.0_211.jdk/Contents/Home/jre/../include/darwin  -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include  -fPIC  -Wall -g -O2  -c conftest.c -o conftest.o
clang -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/Library/Frameworks/R.framework/Resources/lib -L/usr/local/lib -o conftest.so conftest.o -L/Library/Java/JavaVirtualMachines/jdk1.8.0_211.jdk/Contents/Home/jre/lib/server -ljvm -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation

JAVA_HOME        : /Library/Java/JavaVirtualMachines/jdk1.8.0_211.jdk/Contents/Home/jre
Java library path: $(JAVA_HOME)/lib/server
JNI cpp flags    : -I$(JAVA_HOME)/../include -I$(JAVA_HOME)/../include/darwin
JNI linker flags : -L$(JAVA_HOME)/lib/server -ljvm
Updating Java configuration in /Library/Frameworks/R.framework/Resources
Done.

Daddy-Mac-418:~ Lucia$ sudo rm -fr /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin
Password:
Sorry, try again.
Password:
Sorry, try again.
Password:
Daddy-Mac-418:~ Lucia$ sudo rm -fr /Library/PreferencePanes/JavaControlPanel.prefPane
Daddy-Mac-418:~ Lucia$ sudo rm -fr ~/Library/Application\ Support/Oracle/Java
Daddy-Mac-418:~ Lucia$ brew cask install java11
Error: Cask 'java11' is unavailable: No Cask with this name exists.
Daddy-Mac-418:~ Lucia$ brew cask install java9
Error: Cask 'java9' is unavailable: No Cask with this name exists.
Daddy-Mac-418:~ Lucia$ sudo R CMD javareconf 
Password:
Java interpreter : /usr/bin/java
Java version     : 1.8.0_211
Java home path   : /Library/Java/JavaVirtualMachines/jdk1.8.0_211.jdk/Contents/Home/jre
Java compiler    : /usr/bin/javac
Java headers gen.: /usr/bin/javah
Java archive tool: /usr/bin/jar

trying to compile and link a JNI program 
detected JNI cpp flags    : -I$(JAVA_HOME)/../include -I$(JAVA_HOME)/../include/darwin
detected JNI linker flags : -L$(JAVA_HOME)/lib/server -ljvm
clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/Library/Java/JavaVirtualMachines/jdk1.8.0_211.jdk/Contents/Home/jre/../include -I/Library/Java/JavaVirtualMachines/jdk1.8.0_211.jdk/Contents/Home/jre/../include/darwin  -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include  -fPIC  -Wall -g -O2  -c conftest.c -o conftest.o
clang -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/Library/Frameworks/R.framework/Resources/lib -L/usr/local/lib -o conftest.so conftest.o -L/Library/Java/JavaVirtualMachines/jdk1.8.0_211.jdk/Contents/Home/jre/lib/server -ljvm -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation

JAVA_HOME        : /Library/Java/JavaVirtualMachines/jdk1.8.0_211.jdk/Contents/Home/jre
Java library path: $(JAVA_HOME)/lib/server
JNI cpp flags    : -I$(JAVA_HOME)/../include -I$(JAVA_HOME)/../include/darwin
JNI linker flags : -L$(JAVA_HOME)/lib/server -ljvm
Updating Java configuration in /Library/Frameworks/R.framework/Resources
Done.

Daddy-Mac-418:~ Lucia$ java -version
java version "1.8.0_211"
Java(TM) SE Runtime Environment (build 1.8.0_211-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.211-b12, mixed mode)
Daddy-Mac-418:~ Lucia$ sudo rm -fr /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin
Password:
Daddy-Mac-418:~ Lucia$ Lucia$ sudo rm -fr ~/Library/Application\ Support/Oracle/Java
-bash: Lucia$: command not found
Daddy-Mac-418:~ Lucia$ Lucia$ sudo rm -fr /Library/PreferencePanes/JavaControlPanel.prefPane
-bash: Lucia$: command not found
Daddy-Mac-418:~ Lucia$ java -version
java version "1.8.0_211"
Java(TM) SE Runtime Environment (build 1.8.0_211-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.211-b12, mixed mode)
Daddy-Mac-418:~ Lucia$ rm /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin
rm: /Library/Internet Plug-Ins/JavaAppletPlugin.plugin: No such file or directory
Daddy-Mac-418:~ Lucia$ cd /Library/Java/JavaVirtualMachines
Daddy-Mac-418:JavaVirtualMachines Lucia$ ls
1.6.0.jdk       jdk1.8.0_211.jdk
Daddy-Mac-418:JavaVirtualMachines Lucia$ sudo rm -rf jdk-1.6.0.jdk
Daddy-Mac-418:JavaVirtualMachines Lucia$ sudo rm -rf jdk-jdk1.8.0_211.jdk
Daddy-Mac-418:JavaVirtualMachines Lucia$ java -version
java version "1.8.0_211"
Java(TM) SE Runtime Environment (build 1.8.0_211-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.211-b12, mixed mode)
Daddy-Mac-418:JavaVirtualMachines Lucia$ cd /Library/Java/JavaVirtualMachines
Daddy-Mac-418:JavaVirtualMachines Lucia$ ls
1.6.0.jdk       jdk1.8.0_211.jdk
Daddy-Mac-418:JavaVirtualMachines Lucia$ sudo rm -rf 1.6.0.jdk
Daddy-Mac-418:JavaVirtualMachines Lucia$ cd /Library/Java/JavaVirtualMachines
Daddy-Mac-418:JavaVirtualMachines Lucia$ ls
jdk1.8.0_211.jdk
Daddy-Mac-418:JavaVirtualMachines Lucia$ sudo rm -rf jdk1.8.0_211.jdk
Daddy-Mac-418:JavaVirtualMachines Lucia$ cd /Library/Java/JavaVirtualMachines
Daddy-Mac-418:JavaVirtualMachines Lucia$ ls
Daddy-Mac-418:JavaVirtualMachines Lucia$ java -version
No Java runtime present, requesting install.
Daddy-Mac-418:JavaVirtualMachines Lucia$ sudo R CMD javareconf
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
job-working-directory: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
make: getcwd: No such file or directory
job-working-directory: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
make: getcwd: No such file or directory
job-working-directory: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
make: getcwd: No such file or directory
job-working-directory: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
make: getcwd: No such file or directory
job-working-directory: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
make: getcwd: No such file or directory
job-working-directory: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
make: getcwd: No such file or directory
Java interpreter : /usr/bin/java
Error occurred during initialization of VM
java.lang.Error: Properties init: Could not determine current working directory.
    at java.lang.System.initProperties(Native Method)
    at java.lang.System.initializeSystemClass(System.java:1166)
job-working-directory: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory

*** Java interpreter doesn't work properly.

Daddy-Mac-418:JavaVirtualMachines Lucia$ java -version
Error occurred during initialization of VM
java.lang.Error: Properties init: Could not determine current working directory.
    at java.lang.System.initProperties(Native Method)
    at java.lang.System.initializeSystemClass(System.java:1166)

Daddy-Mac-418:JavaVirtualMachines Lucia$ brew cask install java11
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
chdir: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
chdir: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
chdir: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
job-working-directory: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
job-working-directory: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
job-working-directory: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
job-working-directory: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
pwd: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
Error: The current working directory doesn't exist, cannot proceed.
Daddy-Mac-418:JavaVirtualMachines Lucia$ brew update
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
chdir: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
chdir: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
chdir: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
job-working-directory: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
job-working-directory: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
job-working-directory: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
job-working-directory: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
pwd: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
Error: The current working directory doesn't exist, cannot proceed.
Daddy-Mac-418:JavaVirtualMachines Lucia$ cd home
-bash: cd: home: No such file or directory
Daddy-Mac-418:JavaVirtualMachines Lucia$ cd ..
Daddy-Mac-418:Java Lucia$ brew update
Already up-to-date.
Daddy-Mac-418:Java Lucia$ brew search java
==> Formulae
app-engine-java                  google-java-format               javarepl                         jslint4java                      libreadline-java

==> Casks
eclipse-java                              java                                      netbeans-java-se                          yourkit-java-profiler
eclipse-javascript                        netbeans-java-ee                          oracle-jdk-javadoc                        homebrew/cask-versions/java-beta
Daddy-Mac-418:Java Lucia$ cd ..
Daddy-Mac-418:Library Lucia$ cd ~
Daddy-Mac-418:~ Lucia$ java -version
java version "1.8.0_211"
Java(TM) SE Runtime Environment (build 1.8.0_211-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.211-b12, mixed mode)
Daddy-Mac-418:~ Lucia$ cd /Library/Java/JavaVirtualMachines
Daddy-Mac-418:JavaVirtualMachines Lucia$ ls
jdk1.8.0_211.jdk
Daddy-Mac-418:JavaVirtualMachines Lucia$ sudo rm -rf jdk1.8.0_211.jdk/
Password:
Daddy-Mac-418:JavaVirtualMachines Lucia$ java -version
No Java runtime present, requesting install.
Daddy-Mac-418:JavaVirtualMachines Lucia$ ls
Daddy-Mac-418:JavaVirtualMachines Lucia$ cd ..
Daddy-Mac-418:Java Lucia$ cd ..
Daddy-Mac-418:Library Lucia$ cd ..
Daddy-Mac-418:/ Lucia$ cd ..
Daddy-Mac-418:/ Lucia$ brew cask install java
==> Satisfying dependencies
==> Downloading https://download.oracle.com/java/GA/jdk12.0.1/69cfe15208a647278a19ef0990eea691/12/GPL/openjdk-12.0.1_osx-x64_bin.tar.gz
######################################################################## 100.0%
==> Verifying SHA-256 checksum for Cask 'java'.
==> Installing Cask java
==> Moving Generic Artifact 'jdk-12.0.1.jdk' to '/Library/Java/JavaVirtualMachines/openjdk-12.0.1.jdk'.
🍺  java was successfully installed!
Daddy-Mac-418:/ Lucia$ java -version
openjdk version "12.0.1" 2019-04-16
OpenJDK Runtime Environment (build 12.0.1+12)
OpenJDK 64-Bit Server VM (build 12.0.1+12, mixed mode, sharing)
Daddy-Mac-418:/ Lucia$ sudo R CMD javareconf
Password:
Java interpreter : /usr/bin/java
Java version     : 12.0.1
Java home path   : /Library/Java/JavaVirtualMachines/openjdk-12.0.1.jdk/Contents/Home
Java compiler    : /usr/bin/javac
Java headers gen.: /usr/bin/javah
Java archive tool: /usr/bin/jar

trying to compile and link a JNI program 
detected JNI cpp flags    : -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/darwin
detected JNI linker flags : -L$(JAVA_HOME)/lib/server -ljvm
clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/Library/Java/JavaVirtualMachines/openjdk-12.0.1.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/openjdk-12.0.1.jdk/Contents/Home/include/darwin  -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include  -fPIC  -Wall -g -O2  -c conftest.c -o conftest.o
clang -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/Library/Frameworks/R.framework/Resources/lib -L/usr/local/lib -o conftest.so conftest.o -L/Library/Java/JavaVirtualMachines/openjdk-12.0.1.jdk/Contents/Home/lib/server -ljvm -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation

JAVA_HOME        : /Library/Java/JavaVirtualMachines/openjdk-12.0.1.jdk/Contents/Home
Java library path: $(JAVA_HOME)/lib/server
JNI cpp flags    : -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/darwin
JNI linker flags : -L$(JAVA_HOME)/lib/server -ljvm
Updating Java configuration in /Library/Frameworks/R.framework/Resources
Done.

Daddy-Mac-418:/ Lucia$ java -version
openjdk version "12.0.1" 2019-04-16
OpenJDK Runtime Environment (build 12.0.1+12)
OpenJDK 64-Bit Server VM (build 12.0.1+12, mixed mode, sharing)
Daddy-Mac-418:/ Lucia$ cd /Library/Java/JavaVirtualMachines
Daddy-Mac-418:JavaVirtualMachines Lucia$ ls
openjdk-12.0.1.jdk
Daddy-Mac-418:JavaVirtualMachines Lucia$ cd /Library/Java/JavaVirtualMachines
Daddy-Mac-418:JavaVirtualMachines Lucia$ sudo rm -rf openjdk-12.0.1.jdk
Password:
Daddy-Mac-418:JavaVirtualMachines Lucia$ java -version
No Java runtime present, requesting install.
Daddy-Mac-418:JavaVirtualMachines Lucia$ brew search java
==> Formulae
app-engine-java                  google-java-format               javarepl                         jslint4java                      libreadline-java

==> Casks
eclipse-java                              java ✔                                    netbeans-java-se                          yourkit-java-profiler
eclipse-javascript                        netbeans-java-ee                          oracle-jdk-javadoc                        homebrew/cask-versions/java-beta
Daddy-Mac-418:JavaVirtualMachines Lucia$ brew cask install homebrew/cask-versions/java11
==> Tapping homebrew/cask-versions
Cloning into '/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask-versions'...
remote: Enumerating objects: 196, done.
remote: Counting objects: 100% (196/196), done.
remote: Compressing objects: 100% (192/192), done.
remote: Total 196 (delta 10), reused 32 (delta 1), pack-reused 0
Receiving objects: 100% (196/196), 83.11 KiB | 8.31 MiB/s, done.
Resolving deltas: 100% (10/10), done.
Tapped 167 casks (214 files, 320.3KB).
==> Satisfying dependencies
==> Downloading https://download.oracle.com/java/GA/jdk11/9/GPL/openjdk-11.0.2_osx-x64_bin.tar.gz
######################################################################## 100.0%
==> Verifying SHA-256 checksum for Cask 'java11'.
==> Installing Cask java11
==> Moving Generic Artifact 'jdk-11.0.2.jdk' to '/Library/Java/JavaVirtualMachines/openjdk-11.0.2.jdk'.
🍺  java11 was successfully installed!
Daddy-Mac-418:JavaVirtualMachines Lucia$ java -version
openjdk version "11.0.2" 2019-01-15
OpenJDK Runtime Environment 18.9 (build 11.0.2+9)
OpenJDK 64-Bit Server VM 18.9 (build 11.0.2+9, mixed mode)
Daddy-Mac-418:JavaVirtualMachines Lucia$ sudo R CMD javareconf
Java interpreter : /usr/bin/java
Java version     : 11.0.2
Java home path   : /Library/Java/JavaVirtualMachines/openjdk-11.0.2.jdk/Contents/Home
Java compiler    : /usr/bin/javac
Java headers gen.: /usr/bin/javah
Java archive tool: /usr/bin/jar

trying to compile and link a JNI program 
detected JNI cpp flags    : -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/darwin
detected JNI linker flags : -L$(JAVA_HOME)/lib/server -ljvm
clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/Library/Java/JavaVirtualMachines/openjdk-11.0.2.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/openjdk-11.0.2.jdk/Contents/Home/include/darwin  -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include  -fPIC  -Wall -g -O2  -c conftest.c -o conftest.o
clang -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/Library/Frameworks/R.framework/Resources/lib -L/usr/local/lib -o conftest.so conftest.o -L/Library/Java/JavaVirtualMachines/openjdk-11.0.2.jdk/Contents/Home/lib/server -ljvm -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation

JAVA_HOME        : /Library/Java/JavaVirtualMachines/openjdk-11.0.2.jdk/Contents/Home
Java library path: $(JAVA_HOME)/lib/server
JNI cpp flags    : -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/darwin
JNI linker flags : -L$(JAVA_HOME)/lib/server -ljvm
Updating Java configuration in /Library/Frameworks/R.framework/Resources
Done.

Daddy-Mac-418:JavaVirtualMachines Lucia$ 
dernst commented 5 years ago

Try restarting R and run install.packages("rJava") and then library("rJava") .

walinchus commented 5 years ago

Yes I've tried this a few times with no luck. This is me trying this again just now:

Restarting R session...

install.packages("rJava") trying URL 'https://cran.rstudio.com/bin/macosx/el-capitan/contrib/3.6/rJava_0.9-11.tgz' Content type 'application/x-gzip' length 745354 bytes (727 KB)

downloaded 727 KB

The downloaded binary packages are in /var/folders/y9/l7s4rm2x0g934jww243w_mxh0000gn/T//Rtmph9ElST/downloaded_packages

library(rJava) 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 '/Library/Frameworks/R.framework/Versions/3.6/Resources/library/rJava/libs/rJava.so': dlopen(/Library/Frameworks/R.framework/Versions/3.6/Resources/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: /Library/Frameworks/R.framework/Versions/3.6/Resources/library/rJava/libs/rJava.so Reason: image not found

walinchus commented 5 years ago

I deleted all the other javas I had, and downloaded Java 11. The only Java 11 available for download (that I could find anywhere) was Java 11.0.2. It looks like the R package keeps trying to find Java version 11.0.1 or maybe I'm reading that wrong. I usually never use Java honestly but it's a dependency for a package I need.

It shouldn't matter though as I have set the Java home to the current folder and it is still putting up an error:

options("java.home"="/Library/Java/JavaVirtualMachines/openjdk-11.0.2.jdk/Contents/Home/lib")

options("java.home") $java.home [1] "/Library/Java/JavaVirtualMachines/openjdk-11.0.2.jdk/Contents/Home/lib"

Restarting R session...

install.packages("rJava") trying URL 'https://cran.rstudio.com/bin/macosx/el-capitan/contrib/3.6/rJava_0.9-11.tgz' Content type 'application/x-gzip' length 745354 bytes (727 KB)

downloaded 727 KB

The downloaded binary packages are in /var/folders/y9/l7s4rm2x0g934jww243w_mxh0000gn/T//RtmpS6a84E/downloaded_packages

library(rJava) 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 '/Library/Frameworks/R.framework/Versions/3.6/Resources/library/rJava/libs/rJava.so': dlopen(/Library/Frameworks/R.framework/Versions/3.6/Resources/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: /Library/Frameworks/R.framework/Versions/3.6/Resources/library/rJava/libs/rJava.so Reason: image not found

walinchus commented 5 years ago

And thank you for helping on this.

s-u commented 5 years ago

Did you run R CMD javareconf to configure your R with the Java you installed? (see R documentation)

walinchus commented 5 years ago

So this is interesting. I mean it's crazy but helpful to know.

I thought, this package is clearly looking for a folder that says "jdk-11.0.1.jdk" no matter what I do, what if I just... changed the folder name? So I changed "openjdk-11.0.2.jdk" to "jdk-11.0.1.jdk". And the R package loaded! I thought myself so clever. Then I tried to load the xlsx package. And a giant bomb picture appeared on my screen. And my R session had a fatal error. And yeah that was dumb. But anyway I think it's a bug with rJava.

s-u commented 5 years ago

It's not, JDKs are compatible. If you see a "giant bomb" provide details - what software are you using? R doesn't show any bombs. If you're using RStudio (it's not R!) then file a report with them. If the issue exists with R then file here.

walinchus commented 5 years ago

Oh thank you Jesus. Ok so I had run the R CMD javareconf several times:

image

But this past time it did something different and asked me to overwrite stuff. I said yes:

Daddy-Mac-418:~ Lucia$ R CMD javareconf Java interpreter : /Library/Java/JavaVirtualMachines/openjdk-11.0.2.jdk/Contents/Home/bin/java Java version : 11.0.2 Java home path : /Library/Java/JavaVirtualMachines/openjdk-11.0.2.jdk/Contents/Home Java compiler : /Library/Java/JavaVirtualMachines/openjdk-11.0.2.jdk/Contents/Home/bin/javac Java headers gen.: /usr/bin/javah Java archive tool: /Library/Java/JavaVirtualMachines/openjdk-11.0.2.jdk/Contents/Home/bin/jar

trying to compile and link a JNI program detected JNI cpp flags : -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/darwin detected JNI linker flags : -L$(JAVA_HOME)/lib/server -ljvm clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/Library/Java/JavaVirtualMachines/openjdk-11.0.2.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/openjdk-11.0.2.jdk/Contents/Home/include/darwin -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -fPIC -Wall -g -O2 -c conftest.c -o conftest.o clang -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/Library/Frameworks/R.framework/Resources/lib -L/usr/local/lib -o conftest.so conftest.o -L/Library/Java/JavaVirtualMachines/openjdk-11.0.2.jdk/Contents/Home/lib/server -ljvm -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation

JAVA_HOME : /Library/Java/JavaVirtualMachines/openjdk-11.0.2.jdk/Contents/Home Java library path: $(JAVA_HOME)/lib/server JNI cpp flags : -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/darwin JNI linker flags : -L$(JAVA_HOME)/lib/server -ljvm Updating Java configuration in /Library/Frameworks/R.framework/Resources override rw-r--r-- root/admin for /Library/Frameworks/R.framework/Resources/etc/Makeconf? (y/n [n]) y override rw-r--r-- root/admin for /Library/Frameworks/R.framework/Resources/etc/ldpaths? (y/n [n]) y Done.

Daddy-Mac-418:~ Lucia$

Then everything else would finally load:

library(rJava) library(xlsx) install.packages("ImportExport") trying URL 'https://cran.rstudio.com/bin/macosx/el-capitan/contrib/3.6/ImportExport_1.1.tgz' Content type 'application/x-gzip' length 139374 bytes (136 KB)

downloaded 136 KB

The downloaded binary packages are in /var/folders/y9/l7s4rm2x0g934jww243w_mxh0000gn/T//RtmpCWLHvv/downloaded_packages

library(ImportExport) Loading required package: gdata gdata: read.xls support for 'XLS' (Excel 97-2004) files ENABLED.

gdata: read.xls support for 'XLSX' (Excel 2007+) files ENABLED.

Attaching package: ‘gdata’

The following object is masked from ‘package:stats’:

nobs

The following object is masked from ‘package:utils’:

object.size

The following object is masked from ‘package:base’:

startsWith

Loading required package: Hmisc Loading required package: lattice Loading required package: survival Loading required package: Formula Loading required package: ggplot2

Attaching package: ‘Hmisc’

The following objects are masked from ‘package:base’:

format.pval, units

Loading required package: chron Loading required package: RODBC

Thank you so so much Simon for your help. Sorry I had thought this was an underlying R issue which is why I had filed it here.

walinchus commented 5 years ago

Sorry I meant to comment and close.