Re: [R-SIG-Mac] rJava stops loading since I upgraded R to 3.4.0
Christofer, > On May 23, 2017, at 7:44 PM, Christofer Bogaso> wrote: > > Hi David, > > The file 'rJava.so' exists in my machine : > >> file.exists('/Library/Frameworks/R.framework/Versions/3.4/Resources/library/rJava/libs/rJava.so') > > [1] TRUE > > Also the Javac version that I have : > >> system('javac -version') > > javac 1.6.0_65 > > Looks like mine is older than you. Do I need to download the latest? > In that case, do you suggest any link? As far as I know, javac comes > with Mac installed. > Apple has dropped Java support many years ago - what you have a is a left-over from a very old OS X version as you likely upgraded your OS X over the years without re-installing. Since R 3.4.0 the CRAN binary uses Java 1.8, because too many users have complained about incompatibilities with old Java version, so you have two options 1) recompile rJava from sources against your ancient Java 2) install Java 1.8 from Oracle[1], then run R CMD javareconf [1] http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html Cheers, Simon > On Peter's suggestion I also did sudo R CMD javareconf. However still > rJava couldnt be loaded. > > Any other idea? Thanks, > > On Wed, May 24, 2017 at 4:28 AM, peter dalgaard wrote: >> [Christofer seemed to have fallen off the cc: list, now included] >> >>> On 24 May 2017, at 00:18 , David Winsemius wrote: >>> >>> What version of the Java Runtime Environment is available? What do you get >>> for: >>> >>> system('javac -version') >>> #I get: >>> #javac 1.8.0_65 >>> >>> I think that version was working with rJava, but I followed the "critical" >>> advice on the Java SDK webpage ... >>> >>> ... and after updating I now get >>> #javac 1.8.0_131 >>> >>> And rJava still loads without error. I'm not on Sierra, however. >>> >> >> I am, and rJava doesn't load here either. However after >> >> sudo R CMD javareconf >> >> it seems happy as a clam. >> >> >>> Good luck; >>> David, >> >> -- >> Peter Dalgaard, Professor, >> Center for Statistics, Copenhagen Business School >> Solbjerg Plads 3, 2000 Frederiksberg, Denmark >> Phone: (+45)38153501 >> Office: A 4.23 >> Email: pd@cbs.dk Priv: pda...@gmail.com >> >> >> >> >> >> >> >> >> > > ___ > R-SIG-Mac mailing list > R-SIG-Mac@r-project.org > https://stat.ethz.ch/mailman/listinfo/r-sig-mac > ___ R-SIG-Mac mailing list R-SIG-Mac@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-mac
Re: [R-SIG-Mac] rJava stops loading since I upgraded R to 3.4.0
> On May 23, 2017, at 5:29 PM, David Winsemiuswrote: > > >> On May 23, 2017, at 4:44 PM, Christofer Bogaso >> wrote: >> >> Hi David, >> >> The file 'rJava.so' exists in my machine : >> >>> file.exists('/Library/Frameworks/R.framework/Versions/3.4/Resources/library/rJava/libs/rJava.so') >> >> [1] TRUE >> >> Also the Javac version that I have : >> >>> system('javac -version') >> >> javac 1.6.0_65 >> >> Looks like mine is older than you. Do I need to download the latest? >> In that case, do you suggest any link? As far as I know, javac comes >> with Mac installed. > > Yes, it does and some people seem to get success with that. I found that > installing 1.8 (also confusingly known as "Java 8") resolved my difficulties > with loading rJava. I'm not an expert, just reporting my ezxperience >> >> On Peter's suggestion I also did sudo R CMD javareconf. However still >> rJava couldnt be loaded. > > For my machine: > >> Sys.getenv() # returns (among many other values) > > > DYLD_LIBRARY_PATH > /Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/ And I just notice another value in the returns from that command: LD_LIBRARY_PATH :@JAVA_LD@ -- David. > > >> >> Any other idea? Thanks, >> >> On Wed, May 24, 2017 at 4:28 AM, peter dalgaard wrote: >>> [Christofer seemed to have fallen off the cc: list, now included] >>> On 24 May 2017, at 00:18 , David Winsemius wrote: What version of the Java Runtime Environment is available? What do you get for: system('javac -version') #I get: #javac 1.8.0_65 I think that version was working with rJava, but I followed the "critical" advice on the Java SDK webpage ... ... and after updating I now get #javac 1.8.0_131 And rJava still loads without error. I'm not on Sierra, however. >>> >>> I am, and rJava doesn't load here either. However after >>> >>> sudo R CMD javareconf >>> >>> it seems happy as a clam. >>> >>> Good luck; David, >>> >>> -- >>> Peter Dalgaard, Professor, >>> Center for Statistics, Copenhagen Business School >>> Solbjerg Plads 3, 2000 Frederiksberg, Denmark >>> Phone: (+45)38153501 >>> Office: A 4.23 >>> Email: pd@cbs.dk Priv: pda...@gmail.com >>> >>> >>> >>> >>> >>> >>> >>> >>> > > David Winsemius > Alameda, CA, USA > > ___ > R-SIG-Mac mailing list > R-SIG-Mac@r-project.org > https://stat.ethz.ch/mailman/listinfo/r-sig-mac David Winsemius Alameda, CA, USA ___ R-SIG-Mac mailing list R-SIG-Mac@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-mac
Re: [R-SIG-Mac] rJava stops loading since I upgraded R to 3.4.0
> On May 23, 2017, at 4:44 PM, Christofer Bogaso> wrote: > > Hi David, > > The file 'rJava.so' exists in my machine : > >> file.exists('/Library/Frameworks/R.framework/Versions/3.4/Resources/library/rJava/libs/rJava.so') > > [1] TRUE > > Also the Javac version that I have : > >> system('javac -version') > > javac 1.6.0_65 > > Looks like mine is older than you. Do I need to download the latest? > In that case, do you suggest any link? As far as I know, javac comes > with Mac installed. Yes, it does and some people seem to get success with that. I found that installing 1.8 (also confusingly known as "Java 8") resolved my difficulties with loading rJava. I'm not an expert, just reporting my ezxperience > > On Peter's suggestion I also did sudo R CMD javareconf. However still > rJava couldnt be loaded. For my machine: >Sys.getenv() # returns (among many other values) DYLD_LIBRARY_PATH /Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/ > > Any other idea? Thanks, > > On Wed, May 24, 2017 at 4:28 AM, peter dalgaard wrote: >> [Christofer seemed to have fallen off the cc: list, now included] >> >>> On 24 May 2017, at 00:18 , David Winsemius wrote: >>> >>> What version of the Java Runtime Environment is available? What do you get >>> for: >>> >>> system('javac -version') >>> #I get: >>> #javac 1.8.0_65 >>> >>> I think that version was working with rJava, but I followed the "critical" >>> advice on the Java SDK webpage ... >>> >>> ... and after updating I now get >>> #javac 1.8.0_131 >>> >>> And rJava still loads without error. I'm not on Sierra, however. >>> >> >> I am, and rJava doesn't load here either. However after >> >> sudo R CMD javareconf >> >> it seems happy as a clam. >> >> >>> Good luck; >>> David, >> >> -- >> Peter Dalgaard, Professor, >> Center for Statistics, Copenhagen Business School >> Solbjerg Plads 3, 2000 Frederiksberg, Denmark >> Phone: (+45)38153501 >> Office: A 4.23 >> Email: pd@cbs.dk Priv: pda...@gmail.com >> >> >> >> >> >> >> >> >> David Winsemius Alameda, CA, USA ___ R-SIG-Mac mailing list R-SIG-Mac@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-mac
Re: [R-SIG-Mac] rJava stops loading since I upgraded R to 3.4.0
> On May 23, 2017, at 3:18 PM, David Winsemiuswrote: > >> >> On May 23, 2017, at 1:05 PM, Duncan Murdoch wrote: >> >> On 23/05/2017 2:48 PM, Christofer Bogaso wrote: >>> Hi again, >>> >>> After I upgraded R to 3.4.0, I could not load rJava package. Below is >>> the error : >>> 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.4/Resources/library/rJava/libs/rJava.so': > > To Christofer; > > Does > '/Library/Frameworks/R.framework/Versions/3.4/Resources/library/rJava/libs/rJava.so' > exist? > > (You may need to check libPaths() in your new installation. ) You might also want to report the value that Sys.getenv() returns for: DYLD_LIBRARY_PATH For me it is now: /Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/ > > >>> dlopen(/Library/Frameworks/R.framework/Versions/3.4/Resources/library/rJava/libs/rJava.so, >>> 6): Library not loaded: @rpath/libjvm.dylib >>> > > What version of the Java Runtime Environment is available? What do you get > for: > > system('javac -version') > #I get: > #javac 1.8.0_65 > > I think that version was working with rJava, but I followed the "critical" > advice on the Java SDK webpage ... > > ... and after updating I now get > #javac 1.8.0_131 > > And rJava still loads without error. I'm not on Sierra, however. > > Good luck; > David, > > > >>> Referenced from: >>> /Library/Frameworks/R.framework/Versions/3.4/Resources/library/rJava/libs/rJava.so >>> >>> Reason: image not found >>> >>> I have installed latest version of Java. >> >> Did you re-install rJava? Generally speaking you need to re-install all >> packages when switching R versions (except if the only change is in the >> patch level z, where the version number is x.y.z, you can usually use the >> old version). >> >> Duncan Murdoch >> >>> >>> R version : >>> >>> R version 3.4.0 (2017-04-21) -- "You Stupid Darkness" >>> >>> Copyright (C) 2017 The R Foundation for Statistical Computing >>> >>> Platform: x86_64-apple-darwin15.6.0 (64-bit) >>> >>> iOS : Sierra >>> >>> With previous version of R, rJava was working fine. Could you please >>> help how to fix it. >>> >>> Thanks for your time. >>> >>> Regards, >>> >>> ___ >>> R-SIG-Mac mailing list >>> R-SIG-Mac@r-project.org >>> https://stat.ethz.ch/mailman/listinfo/r-sig-mac >>> >> >> ___ >> R-SIG-Mac mailing list >> R-SIG-Mac@r-project.org >> https://stat.ethz.ch/mailman/listinfo/r-sig-mac > > David Winsemius > Alameda, CA, USA > > ___ > R-SIG-Mac mailing list > R-SIG-Mac@r-project.org > https://stat.ethz.ch/mailman/listinfo/r-sig-mac David Winsemius Alameda, CA, USA ___ R-SIG-Mac mailing list R-SIG-Mac@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-mac
Re: [R-SIG-Mac] rJava stops loading since I upgraded R to 3.4.0
Hi David, The file 'rJava.so' exists in my machine : > file.exists('/Library/Frameworks/R.framework/Versions/3.4/Resources/library/rJava/libs/rJava.so') [1] TRUE Also the Javac version that I have : > system('javac -version') javac 1.6.0_65 Looks like mine is older than you. Do I need to download the latest? In that case, do you suggest any link? As far as I know, javac comes with Mac installed. On Peter's suggestion I also did sudo R CMD javareconf. However still rJava couldnt be loaded. Any other idea? Thanks, On Wed, May 24, 2017 at 4:28 AM, peter dalgaardwrote: > [Christofer seemed to have fallen off the cc: list, now included] > >> On 24 May 2017, at 00:18 , David Winsemius wrote: >> >> What version of the Java Runtime Environment is available? What do you get >> for: >> >> system('javac -version') >> #I get: >> #javac 1.8.0_65 >> >> I think that version was working with rJava, but I followed the "critical" >> advice on the Java SDK webpage ... >> >> ... and after updating I now get >> #javac 1.8.0_131 >> >> And rJava still loads without error. I'm not on Sierra, however. >> > > I am, and rJava doesn't load here either. However after > > sudo R CMD javareconf > > it seems happy as a clam. > > >> Good luck; >> David, > > -- > Peter Dalgaard, Professor, > Center for Statistics, Copenhagen Business School > Solbjerg Plads 3, 2000 Frederiksberg, Denmark > Phone: (+45)38153501 > Office: A 4.23 > Email: pd@cbs.dk Priv: pda...@gmail.com > > > > > > > > > ___ R-SIG-Mac mailing list R-SIG-Mac@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-mac
Re: [R-SIG-Mac] rJava stops loading since I upgraded R to 3.4.0
[Christofer seemed to have fallen off the cc: list, now included] > On 24 May 2017, at 00:18 , David Winsemiuswrote: > > What version of the Java Runtime Environment is available? What do you get > for: > > system('javac -version') > #I get: > #javac 1.8.0_65 > > I think that version was working with rJava, but I followed the "critical" > advice on the Java SDK webpage ... > > ... and after updating I now get > #javac 1.8.0_131 > > And rJava still loads without error. I'm not on Sierra, however. > I am, and rJava doesn't load here either. However after sudo R CMD javareconf it seems happy as a clam. > Good luck; > David, -- Peter Dalgaard, Professor, Center for Statistics, Copenhagen Business School Solbjerg Plads 3, 2000 Frederiksberg, Denmark Phone: (+45)38153501 Office: A 4.23 Email: pd@cbs.dk Priv: pda...@gmail.com ___ R-SIG-Mac mailing list R-SIG-Mac@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-mac
Re: [R-SIG-Mac] rJava stops loading since I upgraded R to 3.4.0
> On May 23, 2017, at 1:05 PM, Duncan Murdochwrote: > > On 23/05/2017 2:48 PM, Christofer Bogaso wrote: >> Hi again, >> >> After I upgraded R to 3.4.0, I could not load rJava package. Below is >> the error : >> >>> 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.4/Resources/library/rJava/libs/rJava.so': To Christofer; Does '/Library/Frameworks/R.framework/Versions/3.4/Resources/library/rJava/libs/rJava.so' exist? (You may need to check libPaths() in your new installation. ) >> >> dlopen(/Library/Frameworks/R.framework/Versions/3.4/Resources/library/rJava/libs/rJava.so, >> 6): Library not loaded: @rpath/libjvm.dylib >> What version of the Java Runtime Environment is available? What do you get for: system('javac -version') #I get: #javac 1.8.0_65 I think that version was working with rJava, but I followed the "critical" advice on the Java SDK webpage ... ... and after updating I now get #javac 1.8.0_131 And rJava still loads without error. I'm not on Sierra, however. Good luck; David, >> Referenced from: >> /Library/Frameworks/R.framework/Versions/3.4/Resources/library/rJava/libs/rJava.so >> >> Reason: image not found >> >> I have installed latest version of Java. > > Did you re-install rJava? Generally speaking you need to re-install all > packages when switching R versions (except if the only change is in the patch > level z, where the version number is x.y.z, you can usually use the old > version). > > Duncan Murdoch > >> >> R version : >> >> R version 3.4.0 (2017-04-21) -- "You Stupid Darkness" >> >> Copyright (C) 2017 The R Foundation for Statistical Computing >> >> Platform: x86_64-apple-darwin15.6.0 (64-bit) >> >> iOS : Sierra >> >> With previous version of R, rJava was working fine. Could you please >> help how to fix it. >> >> Thanks for your time. >> >> Regards, >> >> ___ >> R-SIG-Mac mailing list >> R-SIG-Mac@r-project.org >> https://stat.ethz.ch/mailman/listinfo/r-sig-mac >> > > ___ > R-SIG-Mac mailing list > R-SIG-Mac@r-project.org > https://stat.ethz.ch/mailman/listinfo/r-sig-mac David Winsemius Alameda, CA, USA ___ R-SIG-Mac mailing list R-SIG-Mac@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-mac
Re: [R-SIG-Mac] rJava stops loading since I upgraded R to 3.4.0
On 23/05/2017 2:48 PM, Christofer Bogaso wrote: Hi again, After I upgraded R to 3.4.0, I could not load rJava package. Below is the error : 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.4/Resources/library/rJava/libs/rJava.so': dlopen(/Library/Frameworks/R.framework/Versions/3.4/Resources/library/rJava/libs/rJava.so, 6): Library not loaded: @rpath/libjvm.dylib Referenced from: /Library/Frameworks/R.framework/Versions/3.4/Resources/library/rJava/libs/rJava.so Reason: image not found I have installed latest version of Java. Did you re-install rJava? Generally speaking you need to re-install all packages when switching R versions (except if the only change is in the patch level z, where the version number is x.y.z, you can usually use the old version). Duncan Murdoch R version : R version 3.4.0 (2017-04-21) -- "You Stupid Darkness" Copyright (C) 2017 The R Foundation for Statistical Computing Platform: x86_64-apple-darwin15.6.0 (64-bit) iOS : Sierra With previous version of R, rJava was working fine. Could you please help how to fix it. Thanks for your time. Regards, ___ R-SIG-Mac mailing list R-SIG-Mac@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-mac ___ R-SIG-Mac mailing list R-SIG-Mac@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-mac
[R-SIG-Mac] rJava stops loading since I upgraded R to 3.4.0
Hi again, After I upgraded R to 3.4.0, I could not load rJava package. Below is the error : > 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.4/Resources/library/rJava/libs/rJava.so': dlopen(/Library/Frameworks/R.framework/Versions/3.4/Resources/library/rJava/libs/rJava.so, 6): Library not loaded: @rpath/libjvm.dylib Referenced from: /Library/Frameworks/R.framework/Versions/3.4/Resources/library/rJava/libs/rJava.so Reason: image not found I have installed latest version of Java. R version : R version 3.4.0 (2017-04-21) -- "You Stupid Darkness" Copyright (C) 2017 The R Foundation for Statistical Computing Platform: x86_64-apple-darwin15.6.0 (64-bit) iOS : Sierra With previous version of R, rJava was working fine. Could you please help how to fix it. Thanks for your time. Regards, ___ R-SIG-Mac mailing list R-SIG-Mac@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-mac