Hello all.
Steven's approach didn't work for me. I'm running 64 bit R
> R.Version()
$platform
[1] "x86_64-pc-mingw32"
$arch
[1] "x86_64"
$os
[1] "mingw32"
$system
[1] "x86_64, mingw32"
and downloaded and installed the 64 bit version of Java directly from
Oracle. I then tried to load the rJava library and got
Error : .onLoad failed in loadNamespace() for 'rJava', details:
call: inDL(x, as.logical(local), as.logical(now), ...)
error: unable to load shared object 'D:/Users/David
Stevens/Documents/R/win-library/2.15/rJava/libs/x64/rJava.dll':
LoadLibrary failure: %1 is not a valid Win32 application.
Error: package/namespace load failed for 'rJava'
I searched my computer for rJava.dll and found several (> 10) copies
scattered around.
d:\Oneida\CalWaipara>dir /s \rjava.dll
...
Directory of d:\Program Files\R\R-2.13.1\library\rJava\libs\i386
06/24/2011 10:38 AM 80,384 rJava.dll
1 File(s) 80,384 bytes
Directory of d:\Program Files\R\R-2.13.1\library\rJava\libs\x64
06/24/2011 10:39 AM 55,296 rJava.dll
1 File(s) 55,296 bytes
Directory of d:\Program Files\R\R-2.14.1\library\rJava\libs\i386
12/29/2011 11:40 PM 81,408 rJava.dll
1 File(s) 81,408 bytes
Directory of d:\Program Files\R\R-2.14.1\library\rJava\libs\x64
12/29/2011 11:40 PM 55,296 rJava.dll
1 File(s) 55,296 bytes
Directory of d:\Program Files\R\R-2.15.0\library\rJava\libs\i386
12/29/2011 11:40 PM 81,408 rJava.dll
1 File(s) 81,408 bytes
Directory of d:\Program Files\R\R-2.15.0\library\rJava\libs\x64
12/29/2011 11:40 PM 55,296 rJava.dll
1 File(s) 55,296 bytes
Directory of d:\Program Files\R\R-2.15.1\library\rJava\libs\i386
08/29/2012 01:12 PM 57,856 rJava.dll
1 File(s) 57,856 bytes
Directory of d:\Program Files\R\R-2.15.1\library\rJava\libs\x64
08/29/2012 01:12 PM 58,368 rJava.dll
1 File(s) 58,368 bytes
Directory of d:\Users\David
Stevens\Documents\R\win-library\2.13\rJava\libs\i386
07/06/2011 10:06 AM 80,384 rJava.dll
1 File(s) 80,384 bytes
Directory of d:\Users\David
Stevens\Documents\R\win-library\2.13\rJava\libs\x64
07/06/2011 10:06 AM 55,296 rJava.dll
1 File(s) 55,296 bytes
Directory of d:\Users\David
Stevens\Documents\R\win-library\2.15\rJava\libs\i386
10/23/2012 12:30 PM 57,856 rJava.dll
1 File(s) 57,856 bytes
Directory of d:\Users\David
Stevens\Documents\R\win-library\2.15\rJava\libs\x64
10/23/2012 12:30 PM 58,368 rJava.dll
Is there something else I can try? Short of erasing and reinstalling
everything?
Regards
David Stevens
On 10/16/2012 9:19 AM, Steven Ranney wrote:
> Thanks for the information, Simon.
>
> I had both the 64-bit version of R and the 64-bit Windows 7, but not the
> 64-bit version of Java.
>
> Now that I've downloaded the proper version of Java, the problem has been
> solved.
>
> Thanks -
>
> SR
> Steven H. Ranney
>
>
>
> On Mon, Oct 15, 2012 at 5:12 PM, Simon Knapp <[email protected]> wrote:
>
>> My guess would be that your running the 32 bit version of R - and
>> rJava is looking for the 64 bit dll. I'd suggest starting the 64 bit
>> version of R explicitly (e.g. the 64 bit version of Rgui lives at
>> <R_HOME>/bin/x64/Rgui.exe, whereas the 32 bit version lives at
>> <R_HOME>/bin/i386/Rgui.exe).
>>
>> On Tue, Oct 16, 2012 at 2:37 AM, Steven Ranney <[email protected]>
>> wrote:
>>> All --
>>>
>>>
>>>
>>> I'm having a problem with the rJava package. I can download it to my
>>> machine (Win 7 64-bit) but when I try to load the package into R (2.15.1,
>>> 64-bit version), I get the following error:
>>>
>>>
>>>> require(rJava)
>>> Loading required package: rJava
>>>
>>> Error : .onLoad failed in loadNamespace() for 'rJava', details:
>>>
>>> call: inDL(x, as.logical(local), as.logical(now), ...)
>>>
>>> error: unable to load shared object
>>> 'C:/Users/sranney/Documents/R/win-library/2.15/rJava/libs/x64/rJava.dll':
>>>
>>> LoadLibrary failure: %1 is not a valid Win32 application.
>>>
>>>
>>> I have verified that the file R is looking for is in the appropriate
>> place,
>>> but I continue to get the error. I have tried to download rJava from
>>> another source, but still get the error.
>>>
>>>
>>> I have not been able to find another user with this same issue.
>>>
>>>
>>> Thanks for your help --
>>>
>>>
>>> Steven Ranney
>>>
>>> [[alternative HTML version deleted]]
>>>
>>>
>>> ______________________________________________
>>> [email protected] 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.
>>>
> [[alternative HTML version deleted]]
>
>
>
> ______________________________________________
> [email protected] 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.
--
David K Stevens, P.E., Ph.D., Professor
Civil and Environmental Engineering
Utah Water Research Laboratory
8200 Old Main Hill
Logan, UT 84322-8200
435 797 3229 - voice
435 797 1363 - fax
[email protected]
[[alternative HTML version deleted]]
______________________________________________
[email protected] 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.