[R] rJava works with 32-bit but not 64

Spencer Graves spencer.graves at structuremonitoring.com
Mon Feb 4 15:28:31 CET 2013


On 2/4/2013 5:22 AM, Milan Bouchet-Valat wrote:
> Le lundi 04 février 2013 à 08:19 -0400, Simon Urbanek a écrit :
>> On Feb 4, 2013, at 6:33 AM, Spencer Graves wrote:
>>
>>> On 2/3/2013 11:21 PM, Pascal Oettli wrote:
>>>> Hello,
>>>>
>>>> Do you have a 64-bit version of Java?
>>>>
>>>> rJava says to you:
>>>> call: stop("No CurrentVersion entry in '", key, "'! Try
>> re-installing Java and make sure R and Java have matching
>> architectures.")
> Simon, have you noticed there seem to be a bug in rJava about the
> missing 'key' variable? The error message would be (slightly) cleaner if
> the stop() call succeeded, wouldn't it? ;-)


       A subtle bug which only appears with the 64-bit but not the 
32-bit version ... ?


       I agree:  Thanks very much for your work.  Spencer

> Thanks for your work
>
>>>       I think I probably have a 32-bit version and not a 64-bit,
>> because it works with 32-bit R but not 64-bit R.
>>>
>>>       Is it feasible to have both installed in a way that allows the
>> each version of R to select its own version of Java?
>>
>> Yes, that is the default. 32-bit R will only see 32-bit Java and vice
>> versa, because Windows separates 32-bit and 64-bit registries.
>>
>>
>>>   A comment on stackoverflow suggests that may not be easy
>> (http://stackoverflow.com/questions/5272216/is-it-possible-to-install-both-32bit-and-64bit-java-on-windows-7).
>> Ehm, it says "Yes, it is absolutely no problem. " -- which part of it
>> suggests it's not easy? SO is a good source of rumors, seldom facts --
>> but in this case it's not too far from the truth.
>>
>> Cheers,
>> Simon
>>
>>
>>>       Thanks,
>>>       Spencer
>>>
>>>> Regards,
>>>> Pascal
>>>>
>>>>
>>>> Le 04/02/2013 14:27, Spencer Graves a écrit :
>>>>> Hello:
>>>>>
>>>>>
>>>>>        rJava works for me under 32-bit but under not 64-bit R; see below.
>>>>>
>>>>>
>>>>>        Suggestions?
>>>>>        Thanks,
>>>>>        Spencer
>>>>>
>>>>>
>>>>>> library(rJava)
>>>>> Error : .onLoad failed in loadNamespace() for 'rJava', details:
>>>>>    call: stop("No CurrentVersion entry in '", key, "'! Try
>> re-installing
>>>>> Java and make sure R and Java have matching architectures.")
>>>>>    error: object 'key' not found
>>>>> Error: package/namespace load failed for 'rJava'
>>>>>> sessionInfo()
>>>>> R version 2.15.2 (2012-10-26)
>>>>> Platform: x86_64-w64-mingw32/x64 (64-bit)
>>>>>
>>>>> locale:
>>>>> [1] LC_COLLATE=English_United States.1252
>>>>> [2] LC_CTYPE=English_United States.1252
>>>>> [3] LC_MONETARY=English_United States.1252
>>>>> [4] LC_NUMERIC=C
>>>>> [5] LC_TIME=English_United States.1252
>>>>>
>>>>> attached base packages:
>>>>> [1] stats     graphics  grDevices utils     datasets  methods base
>>>>> ##########################
>>>>>
>>>>>
>>>>>> library(rJava)
>>>>>> sessionInfo()
>>>>> R version 2.15.2 (2012-10-26)
>>>>> Platform: i386-w64-mingw32/i386 (32-bit)
>>>>>
>>>>> locale:
>>>>> [1] LC_COLLATE=English_United States.1252
>>>>> [2] LC_CTYPE=English_United States.1252
>>>>> [3] LC_MONETARY=English_United States.1252
>>>>> [4] LC_NUMERIC=C
>>>>> [5] LC_TIME=English_United States.1252
>>>>>
>>>>> attached base packages:
>>>>> [1] stats     graphics  grDevices utils     datasets  methods base
>>>>>
>>>>> other attached packages:
>>>>> [1] rJava_0.9-3
>>>>>
>> ______________________________________________
>> R-help at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide
>> http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list