[R] rJava works on R-32bit but fails in R 64bit

Prof Brian Ripley ripley at stats.ox.ac.uk
Wed Jan 15 21:41:00 CET 2014


On 15/01/2014 20:20, Collin Lynch wrote:
> I'll echo this and expand.  Hui it is possible, indeed likely, that you
> are running a 32bit version of Java.  In that case the error may be
> attributed to a miscommunication between the two.
>
> You can check you java version by running "java -version" in the command
> prompt.  If it is 64 bit it will tell you.  If it does not say 64-Bit then
> you have the 32-bit version and will need to change it.

It is nothing like as simple as that on Windows.  You can have both 
32-but and 64-bit versions of java (including java.exe) installed. 
AFAIK neither java.exe is in your path by default, and what 'java' is 
and what jvm.dll the rJava package finds are completely separate issues. 
  The package looks in the Windows registry to find the right DLL, and 
there are separate 32-bit and 64-bit registries.  The message means that 
there is no Java entry in the 64-bit registry.

Look in the Control Panel to see what JREs you have installed.  Normally 
on a 64-bit Windows the 64-bit one is under Program Files and the 32-bit 
one under Program Files (x86).


>
> 	Best,
> 	Collin.
>
> On Tue, 14 Jan 2014, Jeff Newmiller wrote:
>
>> Post plain text per the posting guide?
>> Install the 64bit version of the Java Runtime?
>> ---------------------------------------------------------------------------
>> Jeff Newmiller                        The     .....       .....  Go Live...
>> DCN:<jdnewmil at dcn.davis.ca.us>        Basics: ##.#.       ##.#.  Live Go...
>>                                        Live:   OO#.. Dead: OO#..  Playing
>> Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
>> /Software/Embedded Controllers)               .OO#.       .OO#.  rocks...1k
>> ---------------------------------------------------------------------------
>> Sent from my phone. Please excuse my brevity.
>>
>> Hui Du <Hui.Du at dataventures.com> wrote:
>>>
>>> Hi All,
>>>
>>> I have R 64bit and R-32 bit installed in my windows 7.
>>>
>>> For 64 bit, the version info is
>>>
>>>> R.Version()
>>> $platform
>>> [1] "x86_64-w64-mingw32"
>>>
>>> $arch
>>> [1] "x86_64"
>>>
>>> $os
>>> [1] "mingw32"
>>>
>>> $system
>>> [1] "x86_64, mingw32"
>>>
>>> $status
>>> [1] ""
>>>
>>> $major
>>> [1] "3"
>>>
>>> $minor
>>> [1] "0.2"
>>>
>>> $year
>>> [1] "2013"
>>>
>>> $month
>>> [1] "09"
>>>
>>> $day
>>> [1] "25"
>>>
>>> $`svn rev`
>>> [1] "63987"
>>>
>>> $language
>>> [1] "R"
>>>
>>> $version.string
>>> [1] "R version 3.0.2 (2013-09-25)"
>>>
>>> $nickname
>>> [1] "Frisbee Sailing"
>>>
>>> While trying to load 'rJava', I got the following error
>>>
>>>> library('rJava')
>>> Error : .onLoad failed in loadNamespace() for 'rJava', details:
>>>   call: fun(libname, pkgname)
>>> error: No CurrentVersion entry in Software/JavaSoft registry! Try
>>> re-installing Java and make sure R and Java have matching
>>> architectures.
>>> Error: package or namespace load failed for 'rJava'
>>>
>>> However it work in my R-32 bit
>>>> R.Version()
>>> $platform
>>> [1] "i386-w64-mingw32"
>>>
>>> $arch
>>> [1] "i386"
>>>
>>> $os
>>> [1] "mingw32"
>>>
>>> $system
>>> [1] "i386, mingw32"
>>>
>>> $status
>>> [1] ""
>>>
>>> $major
>>> [1] "3"
>>>
>>> $minor
>>> [1] "0.2"
>>>
>>> $year
>>> [1] "2013"
>>>
>>> $month
>>> [1] "09"
>>>
>>> $day
>>> [1] "25"
>>>
>>> $`svn rev`
>>> [1] "63987"
>>>
>>> $language
>>> [1] "R"
>>>
>>> $version.string
>>> [1] "R version 3.0.2 (2013-09-25)"
>>>
>>> $nickname
>>> [1] "Frisbee Sailing"
>>>
>>>> library('rJava')
>>>>
>>>
>>>
>>> Does somebody know how to fix the problem in R-64 bit? Many thanks.
>>>
>>> HXD
>>>
>>> 	[[alternative HTML version deleted]]
>>>
>>> ______________________________________________
>>> 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.
>>
>> ______________________________________________
>> 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.
>>
>
> ______________________________________________
> 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.
>


-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595




More information about the R-help mailing list