[R-SIG-Mac] rJava stops loading since I upgraded R to 3.4.0

Simon Urbanek simon.urbanek at r-project.org
Wed May 24 06:58:09 CEST 2017


Christofer,

> On May 23, 2017, at 7:44 PM, Christofer Bogaso <bogaso.christofer at gmail.com> 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 <pdalgd at gmail.com> wrote:
>> [Christofer seemed to have fallen off the cc: list, now included]
>> 
>>> On 24 May 2017, at 00:18 , David Winsemius <dwinsemius at comcast.net> 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.mes at cbs.dk  Priv: PDalgd at gmail.com
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
> 
> _______________________________________________
> R-SIG-Mac mailing list
> R-SIG-Mac at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
> 



More information about the R-SIG-Mac mailing list