status of Java & rJava?

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

status of Java & rJava?

Spencer Graves-3
Hello, All:


       Is Java being deprecated for R?


       I ask, because I've been unable to get rJava 0.9-11 to work under
either macOS 10.15 or Windows 10, and I can't get rJava 0.9-12 to
install -- and my Ecfun package uses it:   I can't get "R CMD build
Ecfun" to work on my Mac nor "R CMD check Ecfun_0.2-4" under Windows. 
Travis CI builds "https://github.com/sbgraves237/Ecfun" just fine.


       The rJava maintainer, Simon Urbanek, has kindly responded to two
of my three emails on this since 2020-03-20, but I've so far been unable
to translate his suggestions into fixes for these problems.


       Should I remove rJava from Ecfun and see what breaks, then see if
I can work around that?  Should I provide the error messages I get for
rJava from "update.packages()" and / or library(rJava) on both machines,
with sessionInfo() to this list or to Stack Exchange or Stack Overflow?


       Since I'm getting so many problems with rJava on under both macOS
and Windows 10, that suggests to me that potential users could have
similar problems, and I should try to remove rJava from Ecfun.


       What do you think?
       Thanks,
       Spencer Graves

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Reply | Threaded
Open this post in threaded view
|

Re: status of Java & rJava?

Gregory R. Warnes-2
Hi Spencer, I'm also having problems getting rJava to work on Mac OS X.

-G

On Sat, Mar 28, 2020 at 4:19 PM Spencer Graves <[hidden email]>
wrote:

> Hello, All:
>
>
>        Is Java being deprecated for R?
>
>
>        I ask, because I've been unable to get rJava 0.9-11 to work under
> either macOS 10.15 or Windows 10, and I can't get rJava 0.9-12 to
> install -- and my Ecfun package uses it:   I can't get "R CMD build
> Ecfun" to work on my Mac nor "R CMD check Ecfun_0.2-4" under Windows.
> Travis CI builds "https://github.com/sbgraves237/Ecfun" just fine.
>
>
>        The rJava maintainer, Simon Urbanek, has kindly responded to two
> of my three emails on this since 2020-03-20, but I've so far been unable
> to translate his suggestions into fixes for these problems.
>
>
>        Should I remove rJava from Ecfun and see what breaks, then see if
> I can work around that?  Should I provide the error messages I get for
> rJava from "update.packages()" and / or library(rJava) on both machines,
> with sessionInfo() to this list or to Stack Exchange or Stack Overflow?
>
>
>        Since I'm getting so many problems with rJava on under both macOS
> and Windows 10, that suggests to me that potential users could have
> similar problems, and I should try to remove rJava from Ecfun.
>
>
>        What do you think?
>        Thanks,
>        Spencer Graves
>
> ______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>


--
"Whereas true religion and good morals are the only solid foundations of
public liberty and happiness . . . it is hereby earnestly recommended to
the several States to take the most effectual measures for the
encouragement thereof." Continental Congress, 1778

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Reply | Threaded
Open this post in threaded view
|

Re: status of Java & rJava?

Ravi Varadhan-2
I, too, had encountered problems with Java on Windows 10 while I was trying to install the package "xlsx."  I tried the fixes I found online, but to no avail.


Thanks & Best regards,

Ravi

________________________________
From: R-devel <[hidden email]> on behalf of Gregory Warnes <[hidden email]>
Sent: Saturday, March 28, 2020 8:14:45 PM
To: Spencer Graves
Cc: [hidden email]
Subject: Re: [Rd] status of Java & rJava?


Hi Spencer, I'm also having problems getting rJava to work on Mac OS X.

-G

On Sat, Mar 28, 2020 at 4:19 PM Spencer Graves <[hidden email]>
wrote:

> Hello, All:
>
>
>        Is Java being deprecated for R?
>
>
>        I ask, because I've been unable to get rJava 0.9-11 to work under
> either macOS 10.15 or Windows 10, and I can't get rJava 0.9-12 to
> install -- and my Ecfun package uses it:   I can't get "R CMD build
> Ecfun" to work on my Mac nor "R CMD check Ecfun_0.2-4" under Windows.
> Travis CI builds "https://github.com/sbgraves237/Ecfun" just fine.
>
>
>        The rJava maintainer, Simon Urbanek, has kindly responded to two
> of my three emails on this since 2020-03-20, but I've so far been unable
> to translate his suggestions into fixes for these problems.
>
>
>        Should I remove rJava from Ecfun and see what breaks, then see if
> I can work around that?  Should I provide the error messages I get for
> rJava from "update.packages()" and / or library(rJava) on both machines,
> with sessionInfo() to this list or to Stack Exchange or Stack Overflow?
>
>
>        Since I'm getting so many problems with rJava on under both macOS
> and Windows 10, that suggests to me that potential users could have
> similar problems, and I should try to remove rJava from Ecfun.
>
>
>        What do you think?
>        Thanks,
>        Spencer Graves
>
> ______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>


--
"Whereas true religion and good morals are the only solid foundations of
public liberty and happiness . . . it is hereby earnestly recommended to
the several States to take the most effectual measures for the
encouragement thereof." Continental Congress, 1778

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Reply | Threaded
Open this post in threaded view
|

Re: status of Java & rJava?

Simon Urbanek
In reply to this post by Spencer Graves-3
Spencer,

you could argue that Java is dead since Oracle effectively killed it by removing all public downloads, but if you manage to get hold of a Java installation then it works just fine with R. To my best knowledge there has never been an issue if you installed rJava from source. macOS Catalina has made binary distributions impossible due to additional restrictions on run-time, but even that has been how solved with the release of rJava 0.9-12, so please make sure you use the latest rJava. In most cases that I have seen issues were caused by incorrect configuration (setting JAVA_HOME incorrectly [do NOT set it unless you know what you're doing!], not installing Java for the same architecture as R etc.). If you have any issues feel free to report them. rJava 0.9-12 has quite a few changes that try to detect user errors better and report them so I strongly suggest users to upgrade.

Cheers,
Simon


> On 29/03/2020, at 9:18 AM, Spencer Graves <[hidden email]> wrote:
>
> Hello, All:
>
>
>       Is Java being deprecated for R?
>
>
>       I ask, because I've been unable to get rJava 0.9-11 to work under either macOS 10.15 or Windows 10, and I can't get rJava 0.9-12 to install -- and my Ecfun package uses it:   I can't get "R CMD build Ecfun" to work on my Mac nor "R CMD check Ecfun_0.2-4" under Windows.  Travis CI builds "https://github.com/sbgraves237/Ecfun" just fine.
>
>
>       The rJava maintainer, Simon Urbanek, has kindly responded to two of my three emails on this since 2020-03-20, but I've so far been unable to translate his suggestions into fixes for these problems.
>
>
>       Should I remove rJava from Ecfun and see what breaks, then see if I can work around that?  Should I provide the error messages I get for rJava from "update.packages()" and / or library(rJava) on both machines, with sessionInfo() to this list or to Stack Exchange or Stack Overflow?
>
>
>       Since I'm getting so many problems with rJava on under both macOS and Windows 10, that suggests to me that potential users could have similar problems, and I should try to remove rJava from Ecfun.
>
>
>       What do you think?
>       Thanks,
>       Spencer Graves
>
> ______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Reply | Threaded
Open this post in threaded view
|

Re: [BULK] Re: status of Java & rJava?

Spencer Graves-3
Hi, Simon et al.:


       My attempts to install rJava 0.9-12 from source failed under both
macOS 10.15.4 and Windows 10.


       Below please find what I got just now trying "update.packages()"
and selecting "install from sources" on both computers followed by
"sessionInfo()" in each case.


       Thanks for your help.
       Spencer Graves


  update.packages()
rJava :
  Version 0.9-11 installed in
/Library/Frameworks/R.framework/Versions/3.6/Resources/library
  Version 0.9-12 available at https://cran.rstudio.com
Update? (Yes/no/cancel) y
sf :
  Version 0.8-1 installed in
/Library/Frameworks/R.framework/Versions/3.6/Resources/library
  Version 0.9-0 available at https://cran.rstudio.com
Update? (Yes/no/cancel) n
XLConnect :
  Version 0.2-15 installed in
/Library/Frameworks/R.framework/Versions/3.6/Resources/library
  Version 1.0.1 available at https://cran.rstudio.com
Update? (Yes/no/cancel) n

   There is a binary version available but the
   source version is later:
       binary source needs_compilation
rJava 0.9-11 0.9-12              TRUE

Do you want to install from sources the package which needs compilation?
(Yes/no/cancel) y
installing the source package ‘rJava’

trying URL 'https://cran.rstudio.com/src/contrib/rJava_0.9-12.tar.gz'
Content type 'application/x-gzip' length 1103629 bytes (1.1 MB)
==================================================
downloaded 1.1 MB

* installing *source* package ‘rJava’ ...
** package ‘rJava’ successfully unpacked and MD5 sums checked
** using staged installation
checking for gcc... clang
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... configure: error: in
`/private/var/folders/mh/mrm_14nx19g13lsnj9zmvwjr0000gn/T/Rtmpm3rVc5/R.INSTALL5d09696e941d/rJava':
configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details
ERROR: configuration failed for package ‘rJava’
* removing
‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/rJava’
* restoring previous
‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/rJava’

The downloaded source packages are in
‘/private/var/folders/mh/mrm_14nx19g13lsnj9zmvwjr0000gn/T/RtmpbxyWRI/downloaded_packages’
Warning message:
In install.packages(update[instlib == l, "Package"], l, repos = repos,  :
   installation of package ‘rJava’ had non-zero exit status
 > sessionInfo()
R version 3.6.3 (2020-02-29)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS Catalina 10.15.4

Matrix products: default
BLAS:
/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK:
/Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets
[6] methods   base

loaded via a namespace (and not attached):
[1] compiler_3.6.3 tools_3.6.3



 > update.packages()
rJava :
  Version 0.9-11 installed in C:/Program Files/R/R-3.6.3/library
  Version 0.9-12 available at https://cran.rstudio.com

   There is a binary version available but
   the source version is later:
       binary source needs_compilation
rJava 0.9-11 0.9-12              TRUE

installing the source package 'rJava'

trying URL 'https://cran.rstudio.com/src/contrib/rJava_0.9-12.tar.gz'
Content type 'application/x-gzip' length 1103629 bytes (1.1 MB)
downloaded 1.1 MB

* installing *source* package 'rJava' ...
** package 'rJava' successfully unpacked and MD5 sums checked
** using staged installation
Generate Windows-specific files (src/jvm-w32) ...
make: Entering directory
'/Users/spenc/AppData/Local/Temp/RtmpQbnYkA/R.INSTALL8ec5478248a/rJava/src/jvm-w32'
c:/Rtools/mingw_64/bin/dlltool --as c:/Rtools/mingw_64/bin/as
--input-def jvm64.def --kill-at --dllname jvm.dll --output-lib libjvm.dll.a
c:/Rtools/mingw_64/bin/gcc  -O2 -c -o findjava.o findjava.c
c:/Rtools/mingw_64/bin/gcc  -s -o findjava.exe findjava.o
make: Leaving directory
'/Users/spenc/AppData/Local/Temp/RtmpQbnYkA/R.INSTALL8ec5478248a/rJava/src/jvm-w32'
Find Java...
   JAVA_HOME=C:/PROGRA~1/Java/JRE18~1.0_2
=== Building JRI ===
   JAVA_HOME=C:/PROGRA~1/Java/JRE18~1.0_2
   R_HOME=C:/PROGRA~1/R/R-36~1.3
JDK has no javah.exe - using javac -h . instead
Creating Makefiles ...
Configuration done.
make -C src JRI.jar
make[1]: Entering directory
'/Users/spenc/AppData/Local/Temp/RtmpQbnYkA/R.INSTALL8ec5478248a/rJava/jri/src'
C:/PROGRA~1/Java/JRE18~1.0_2/bin/javac -h . -d . ../RList.java
../RBool.java ../RVector.java ../RMainLoopCallbacks.java
../RConsoleOutputStream.java ../Mutex.java ../Rengine.java ../REXP.java
../RFactor.java ../package-info.java
sh: C:/PROGRA~1/Java/JRE18~1.0_2/bin/javac: No such file or directory
make[1]: *** [Makefile.all:41: org/rosuda/JRI/Rengine.class] Error 127
make[1]: Leaving directory
'/Users/spenc/AppData/Local/Temp/RtmpQbnYkA/R.INSTALL8ec5478248a/rJava/jri/src'
make: *** [Makefile.all:19: src/JRI.jar] Error 2
**** WARNING: JRI could NOT be built
Set IGNORE=1 if you want to build rJava anyway.
ERROR: configuration failed for package 'rJava'
* removing 'C:/Program Files/R/R-3.6.3/library/rJava'
* restoring previous 'C:/Program Files/R/R-3.6.3/library/rJava'

The downloaded source packages are in
'C:\Users\spenc\AppData\Local\Temp\RtmpsDQIkn\downloaded_packages'
Warning message:
In install.packages(update[instlib == l, "Package"], l, repos = repos,  :
   installation of package 'rJava' had non-zero exit status

 > sessionInfo()
R version 3.6.3 (2020-02-29)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 18362)

Matrix products: default

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
[5] datasets  methods   base

loaded via a namespace (and not attached):
[1] compiler_3.6.3 tools_3.6.3


On 2020-03-28 22:07, Simon Urbanek wrote:

> Spencer,
>
> you could argue that Java is dead since Oracle effectively killed it by removing all public downloads, but if you manage to get hold of a Java installation then it works just fine with R. To my best knowledge there has never been an issue if you installed rJava from source. macOS Catalina has made binary distributions impossible due to additional restrictions on run-time, but even that has been how solved with the release of rJava 0.9-12, so please make sure you use the latest rJava. In most cases that I have seen issues were caused by incorrect configuration (setting JAVA_HOME incorrectly [do NOT set it unless you know what you're doing!], not installing Java for the same architecture as R etc.). If you have any issues feel free to report them. rJava 0.9-12 has quite a few changes that try to detect user errors better and report them so I strongly suggest users to upgrade.
>
> Cheers,
> Simon
>
>
>> On 29/03/2020, at 9:18 AM, Spencer Graves <[hidden email]> wrote:
>>
>> Hello, All:
>>
>>
>>        Is Java being deprecated for R?
>>
>>
>>        I ask, because I've been unable to get rJava 0.9-11 to work under either macOS 10.15 or Windows 10, and I can't get rJava 0.9-12 to install -- and my Ecfun package uses it:   I can't get "R CMD build Ecfun" to work on my Mac nor "R CMD check Ecfun_0.2-4" under Windows.  Travis CI builds "https://github.com/sbgraves237/Ecfun" just fine.
>>
>>
>>        The rJava maintainer, Simon Urbanek, has kindly responded to two of my three emails on this since 2020-03-20, but I've so far been unable to translate his suggestions into fixes for these problems.
>>
>>
>>        Should I remove rJava from Ecfun and see what breaks, then see if I can work around that?  Should I provide the error messages I get for rJava from "update.packages()" and / or library(rJava) on both machines, with sessionInfo() to this list or to Stack Exchange or Stack Overflow?
>>
>>
>>        Since I'm getting so many problems with rJava on under both macOS and Windows 10, that suggests to me that potential users could have similar problems, and I should try to remove rJava from Ecfun.
>>
>>
>>        What do you think?
>>        Thanks,
>>        Spencer Graves
>>
>> ______________________________________________
>> [hidden email] mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-devel
>>

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Reply | Threaded
Open this post in threaded view
|

Re: [BULK] Re: status of Java & rJava?

Simon Urbanek
Spencer,

1) you don't seem to have working tools on your Mac (check config.log)
2) on Windows you don't have JDK installed

I would strongly recommend using the CRAN binaries of rJava 0.9-12 unless you know what you're doing and have all the tools (for Mac use https://mac.R-project.org as mirror since there was a hiccup with macOS sync across mirrors).

Cheers,
Simon




> On 29/03/2020, at 4:29 PM, Spencer Graves <[hidden email]> wrote:
>
> Hi, Simon et al.:
>
>
>       My attempts to install rJava 0.9-12 from source failed under both macOS 10.15.4 and Windows 10.
>
>
>       Below please find what I got just now trying "update.packages()" and selecting "install from sources" on both computers followed by "sessionInfo()" in each case.
>
>
>       Thanks for your help.
>       Spencer Graves
>
>
>  update.packages()
> rJava :
>  Version 0.9-11 installed in /Library/Frameworks/R.framework/Versions/3.6/Resources/library
>  Version 0.9-12 available at https://cran.rstudio.com
> Update? (Yes/no/cancel) y
> sf :
>  Version 0.8-1 installed in /Library/Frameworks/R.framework/Versions/3.6/Resources/library
>  Version 0.9-0 available at https://cran.rstudio.com
> Update? (Yes/no/cancel) n
> XLConnect :
>  Version 0.2-15 installed in /Library/Frameworks/R.framework/Versions/3.6/Resources/library
>  Version 1.0.1 available at https://cran.rstudio.com
> Update? (Yes/no/cancel) n
>
>   There is a binary version available but the
>   source version is later:
>       binary source needs_compilation
> rJava 0.9-11 0.9-12              TRUE
>
> Do you want to install from sources the package which needs compilation? (Yes/no/cancel) y
> installing the source package ‘rJava’
>
> trying URL 'https://cran.rstudio.com/src/contrib/rJava_0.9-12.tar.gz'
> Content type 'application/x-gzip' length 1103629 bytes (1.1 MB)
> ==================================================
> downloaded 1.1 MB
>
> * installing *source* package ‘rJava’ ...
> ** package ‘rJava’ successfully unpacked and MD5 sums checked
> ** using staged installation
> checking for gcc... clang
> checking whether the C compiler works... yes
> checking for C compiler default output file name... a.out
> checking for suffix of executables...
> checking whether we are cross compiling... configure: error: in `/private/var/folders/mh/mrm_14nx19g13lsnj9zmvwjr0000gn/T/Rtmpm3rVc5/R.INSTALL5d09696e941d/rJava':
> configure: error: cannot run C compiled programs.
> If you meant to cross compile, use `--host'.
> See `config.log' for more details
> ERROR: configuration failed for package ‘rJava’
> * removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/rJava’
> * restoring previous ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/rJava’
>
> The downloaded source packages are in
> ‘/private/var/folders/mh/mrm_14nx19g13lsnj9zmvwjr0000gn/T/RtmpbxyWRI/downloaded_packages’
> Warning message:
> In install.packages(update[instlib == l, "Package"], l, repos = repos,  :
>   installation of package ‘rJava’ had non-zero exit status
> > sessionInfo()
> R version 3.6.3 (2020-02-29)
> Platform: x86_64-apple-darwin15.6.0 (64-bit)
> Running under: macOS Catalina 10.15.4
>
> Matrix products: default
> BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
> LAPACK: /Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libRlapack.dylib
>
> locale:
> [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
>
> attached base packages:
> [1] stats     graphics  grDevices utils     datasets
> [6] methods   base
>
> loaded via a namespace (and not attached):
> [1] compiler_3.6.3 tools_3.6.3
>
>
>
> > update.packages()
> rJava :
>  Version 0.9-11 installed in C:/Program Files/R/R-3.6.3/library
>  Version 0.9-12 available at https://cran.rstudio.com
>
>   There is a binary version available but
>   the source version is later:
>       binary source needs_compilation
> rJava 0.9-11 0.9-12              TRUE
>
> installing the source package 'rJava'
>
> trying URL 'https://cran.rstudio.com/src/contrib/rJava_0.9-12.tar.gz'
> Content type 'application/x-gzip' length 1103629 bytes (1.1 MB)
> downloaded 1.1 MB
>
> * installing *source* package 'rJava' ...
> ** package 'rJava' successfully unpacked and MD5 sums checked
> ** using staged installation
> Generate Windows-specific files (src/jvm-w32) ...
> make: Entering directory '/Users/spenc/AppData/Local/Temp/RtmpQbnYkA/R.INSTALL8ec5478248a/rJava/src/jvm-w32'
> c:/Rtools/mingw_64/bin/dlltool --as c:/Rtools/mingw_64/bin/as --input-def jvm64.def --kill-at --dllname jvm.dll --output-lib libjvm.dll.a
> c:/Rtools/mingw_64/bin/gcc  -O2 -c -o findjava.o findjava.c
> c:/Rtools/mingw_64/bin/gcc  -s -o findjava.exe findjava.o
> make: Leaving directory '/Users/spenc/AppData/Local/Temp/RtmpQbnYkA/R.INSTALL8ec5478248a/rJava/src/jvm-w32'
> Find Java...
>   JAVA_HOME=C:/PROGRA~1/Java/JRE18~1.0_2
> === Building JRI ===
>   JAVA_HOME=C:/PROGRA~1/Java/JRE18~1.0_2
>   R_HOME=C:/PROGRA~1/R/R-36~1.3
> JDK has no javah.exe - using javac -h . instead
> Creating Makefiles ...
> Configuration done.
> make -C src JRI.jar
> make[1]: Entering directory '/Users/spenc/AppData/Local/Temp/RtmpQbnYkA/R.INSTALL8ec5478248a/rJava/jri/src'
> C:/PROGRA~1/Java/JRE18~1.0_2/bin/javac -h . -d . ../RList.java ../RBool.java ../RVector.java ../RMainLoopCallbacks.java ../RConsoleOutputStream.java ../Mutex.java ../Rengine.java ../REXP.java ../RFactor.java ../package-info.java
> sh: C:/PROGRA~1/Java/JRE18~1.0_2/bin/javac: No such file or directory
> make[1]: *** [Makefile.all:41: org/rosuda/JRI/Rengine.class] Error 127
> make[1]: Leaving directory '/Users/spenc/AppData/Local/Temp/RtmpQbnYkA/R.INSTALL8ec5478248a/rJava/jri/src'
> make: *** [Makefile.all:19: src/JRI.jar] Error 2
> **** WARNING: JRI could NOT be built
> Set IGNORE=1 if you want to build rJava anyway.
> ERROR: configuration failed for package 'rJava'
> * removing 'C:/Program Files/R/R-3.6.3/library/rJava'
> * restoring previous 'C:/Program Files/R/R-3.6.3/library/rJava'
>
> The downloaded source packages are in
> 'C:\Users\spenc\AppData\Local\Temp\RtmpsDQIkn\downloaded_packages'
> Warning message:
> In install.packages(update[instlib == l, "Package"], l, repos = repos,  :
>   installation of package 'rJava' had non-zero exit status
>
> > sessionInfo()
> R version 3.6.3 (2020-02-29)
> Platform: x86_64-w64-mingw32/x64 (64-bit)
> Running under: Windows 10 x64 (build 18362)
>
> Matrix products: default
>
> 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
> [5] datasets  methods   base
>
> loaded via a namespace (and not attached):
> [1] compiler_3.6.3 tools_3.6.3
>
>
> On 2020-03-28 22:07, Simon Urbanek wrote:
>> Spencer,
>>
>> you could argue that Java is dead since Oracle effectively killed it by removing all public downloads, but if you manage to get hold of a Java installation then it works just fine with R. To my best knowledge there has never been an issue if you installed rJava from source. macOS Catalina has made binary distributions impossible due to additional restrictions on run-time, but even that has been how solved with the release of rJava 0.9-12, so please make sure you use the latest rJava. In most cases that I have seen issues were caused by incorrect configuration (setting JAVA_HOME incorrectly [do NOT set it unless you know what you're doing!], not installing Java for the same architecture as R etc.). If you have any issues feel free to report them. rJava 0.9-12 has quite a few changes that try to detect user errors better and report them so I strongly suggest users to upgrade.
>>
>> Cheers,
>> Simon
>>
>>
>>> On 29/03/2020, at 9:18 AM, Spencer Graves <[hidden email]> wrote:
>>>
>>> Hello, All:
>>>
>>>
>>>       Is Java being deprecated for R?
>>>
>>>
>>>       I ask, because I've been unable to get rJava 0.9-11 to work under either macOS 10.15 or Windows 10, and I can't get rJava 0.9-12 to install -- and my Ecfun package uses it:   I can't get "R CMD build Ecfun" to work on my Mac nor "R CMD check Ecfun_0.2-4" under Windows.  Travis CI builds "https://github.com/sbgraves237/Ecfun" just fine.
>>>
>>>
>>>       The rJava maintainer, Simon Urbanek, has kindly responded to two of my three emails on this since 2020-03-20, but I've so far been unable to translate his suggestions into fixes for these problems.
>>>
>>>
>>>       Should I remove rJava from Ecfun and see what breaks, then see if I can work around that?  Should I provide the error messages I get for rJava from "update.packages()" and / or library(rJava) on both machines, with sessionInfo() to this list or to Stack Exchange or Stack Overflow?
>>>
>>>
>>>       Since I'm getting so many problems with rJava on under both macOS and Windows 10, that suggests to me that potential users could have similar problems, and I should try to remove rJava from Ecfun.
>>>
>>>
>>>       What do you think?
>>>       Thanks,
>>>       Spencer Graves
>>>
>>> ______________________________________________
>>> [hidden email] mailing list
>>> https://stat.ethz.ch/mailman/listinfo/r-devel
>>>
>

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Reply | Threaded
Open this post in threaded view
|

Re: status of Java & rJava?

Prof Brian Ripley
In reply to this post by Simon Urbanek
On 29/03/2020 04:07, Simon Urbanek wrote:
> Spencer,
>
> you could argue that Java is dead since Oracle effectively killed it by removing all public downloads, but if you manage to get hold of a Java installation then it works just fine with R. To my best knowledge there has never been an issue if you installed rJava from source. macOS Catalina has made binary distributions impossible due to additional restrictions on run-time, but even that has been how solved with the release of rJava 0.9-12, so please make sure you use the latest rJava. In most cases that I have seen issues were caused by incorrect configuration (setting JAVA_HOME incorrectly [do NOT set it unless you know what you're doing!], not installing Java for the same architecture as R etc.). If you have any issues feel free to report them. rJava 0.9-12 has quite a few changes that try to detect user errors better and report them so I strongly suggest users to upgrade.

There is OpenJDK, and https://adoptopenjdk.net provides binaries for
macOS, including the preferred Java 11 LTS.  I just re-checked that, and
after

env
JAVA_HOME=/Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/Home
R CMD javareconf

I was able to install from source and check rJava 0.9-12 in 4.0.0 alpha.
  For the CRAN binary of 3.6.3 I had to make sure I was using clang 7:
'clang' defaults to that in the Apple CLT which does not support
-fopenmp -- but the binary package just worked.

[All on Catalina.]

--
Brian D. Ripley,                  [hidden email]
Emeritus Professor of Applied Statistics, University of Oxford

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Reply | Threaded
Open this post in threaded view
|

Re: status of Java & rJava?

Spencer Graves-3


On 2020-03-28 23:07, Prof Brian Ripley wrote:

> On 29/03/2020 04:07, Simon Urbanek wrote:
>> Spencer,
>>
>> you could argue that Java is dead since Oracle effectively killed it
>> by removing all public downloads, but if you manage to get hold of a
>> Java installation then it works just fine with R. To my best
>> knowledge there has never been an issue if you installed rJava from
>> source. macOS Catalina has made binary distributions impossible due
>> to additional restrictions on run-time, but even that has been how
>> solved with the release of rJava 0.9-12, so please make sure you use
>> the latest rJava. In most cases that I have seen issues were caused
>> by incorrect configuration (setting JAVA_HOME incorrectly [do NOT set
>> it unless you know what you're doing!], not installing Java for the
>> same architecture as R etc.). If you have any issues feel free to
>> report them. rJava 0.9-12 has quite a few changes that try to detect
>> user errors better and report them so I strongly suggest users to
>> upgrade.
>
> There is OpenJDK, and https://adoptopenjdk.net provides binaries for
> macOS, including the preferred Java 11 LTS.  I just re-checked that,
> and after
>
> env
> JAVA_HOME=/Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/Home
> R CMD javareconf
>
> I was able to install from source and check rJava 0.9-12 in 4.0.0
> alpha.  For the CRAN binary of 3.6.3 I had to make sure I was using
> clang 7: 'clang' defaults to that in the Apple CLT which does not
> support -fopenmp -- but the binary package just worked.
>
> [All on Catalina.]

Thanks.  That worked on Catalina.  When installing OpenJDK on Windows
10, The default for "Set JAVA_HOME" was 'X';  I changed that to
install.  It didn't work at first, but did after I rebooted.


Thanks again to both Simon Urbanek and Prof. Ripley.  Spencer Graves

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Reply | Threaded
Open this post in threaded view
|

Re: status of Java & rJava?

Adrian Trapletti-2
In reply to this post by Spencer Graves-3
Simon,

Java is still one of the most popular languages out there, in
particular in large organizations. See e.g.
https://www.tiobe.com/tiobe-index/ . However, there has been a lot of
confusion because of Oracle's licencing change in 2019. But the good
news is, there are more alternatives than ever. See e.g.
https://labs.consol.de/development/2019/02/05/oracle-license-is-the-free-lunch-over.html
. And also Oracle has a very interesting new VM significantly
improving startup time, the community edition is under GPL-2. See
https://www.graalvm.org/ .

Cheers,
Adrian

Adrian Trapletti

Steinstrasse 9b, 8610 Uster, Switzerland
P +41 44 994 56 30  |  M +41 79 103 71 31
[hidden email]  |  www.trapletti.org


On Sun, Mar 29, 2020 at 12:02 PM <[hidden email]> wrote:

>
> ...
> Message: 4
> Date: Sun, 29 Mar 2020 16:07:13 +1300
> From: Simon Urbanek <[hidden email]>
> To: Spencer Graves <[hidden email]>
> Cc: "[hidden email]" <[hidden email]>
> Subject: Re: [Rd] status of Java & rJava?
> Message-ID: <[hidden email]>
> Content-Type: text/plain; charset="us-ascii"
>
> Spencer,
>
> you could argue that Java is dead since Oracle effectively killed it by removing all public downloads, but if you manage to get hold of a Java installation then it works just fine with R. To my best knowledge there has never been an issue if you installed rJava from source. macOS Catalina has made binary distributions impossible due to additional restrictions on run-time, but even that has been how solved with the release of rJava 0.9-12, so please make sure you use the latest rJava. In most cases that I have seen issues were caused by incorrect configuration (setting JAVA_HOME incorrectly [do NOT set it unless you know what you're doing!], not installing Java for the same architecture as R etc.). If you have any issues feel free to report them. rJava 0.9-12 has quite a few changes that try to detect user errors better and report them so I strongly suggest users to upgrade.
>
> Cheers,
> Simon
>
>
> > On 29/03/2020, at 9:18 AM, Spencer Graves <[hidden email]> wrote:
> >
> > Hello, All:
> >
> >
> >       Is Java being deprecated for R?
> >
> >
> >       I ask, because I've been unable to get rJava 0.9-11 to work under either macOS 10.15 or Windows 10, and I can't get rJava 0.9-12 to install -- and my Ecfun package uses it:   I can't get "R CMD build Ecfun" to work on my Mac nor "R CMD check Ecfun_0.2-4" under Windows.  Travis CI builds "https://github.com/sbgraves237/Ecfun" just fine.
> >
> >
> >       The rJava maintainer, Simon Urbanek, has kindly responded to two of my three emails on this since 2020-03-20, but I've so far been unable to translate his suggestions into fixes for these problems.
> >
> >
> >       Should I remove rJava from Ecfun and see what breaks, then see if I can work around that?  Should I provide the error messages I get for rJava from "update.packages()" and / or library(rJava) on both machines, with sessionInfo() to this list or to Stack Exchange or Stack Overflow?
> >
> >
> >       Since I'm getting so many problems with rJava on under both macOS and Windows 10, that suggests to me that potential users could have similar problems, and I should try to remove rJava from Ecfun.
> >
> >
> >       What do you think?
> >       Thanks,
> >       Spencer Graves
> >
> > ______________________________________________
> > [hidden email] mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-devel
> >
> ...
> Subject: Digest Footer
>
> _______________________________________________
> [hidden email] mailing list  DIGESTED
> https://stat.ethz.ch/mailman/listinfo/r-devel
>
>
> ------------------------------
>
> End of R-devel Digest, Vol 205, Issue 21
> ****************************************

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Reply | Threaded
Open this post in threaded view
|

Re: status of Java & rJava?

Spencer Graves-3
In reply to this post by Prof Brian Ripley
       I spoke too soon in saying that everything worked with OpenJDK: 
"R CMD check Ecfun_0.2-4.tar.gz" using
"https://github.com/sbgraves237/Ecfun" worked fine on my Mac but failed
with "error: DLL 'rJava' not found: maybe not installed for this
architecture?" under Windows 10.  "00install.out" and
"Sys.getenv('PATH')" follow.  "library(rJava)" seemed to work, and
"help(pac='rJava') displays 0.9-12.  Suggestions?  Thanks, Spencer Graves


* installing *source* package 'Ecfun' ...
** using staged installation
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
*** arch - i386
Error: package or namespace load failed for 'Ecfun':
  .onLoad failed in loadNamespace() for 'rJava', details:
   call: library.dynam("rJava", pkgname, libname)
   error: DLL 'rJava' not found: maybe not installed for this architecture?
Error: loading failed
Execution halted
*** arch - x64
ERROR: loading failed for 'i386'
* removing 'C:/Users/spenc/Documents/R/Ecfun/Ecfun.Rcheck/Ecfun'

######################

 > Sys.getenv('PATH')
[1] "C:\\Program Files\\R\\R-3.6.3\\bin\\x64;C:\\Program
Files\\AdoptOpenJDK\\jdk-11.0.6.10-hotspot\\bin;C:\\Program
Files\\Java\\jre1.8.0_241;C:\\Rtools\\bin;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\;C:\\WINDOWS\\System32\\OpenSSH\\;C:\\Program
Files\\Microsoft VS Code\\bin;C:\\Program Files\\Git\\cmd;C:\\Program
Files\\TortoiseSVN\\bin;c:\\programFiles\\ffmpeg\\ffmpeg-4.1\\;C:\\Program
Files\\Pandoc\\;C:\\Program Files\\MiKTeX
2.9\\miktex\\bin\\x64\\;C:\\Users\\spenc\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Users\\spenc\\AppData\\Local\\GitHubDesktop\\bin;C:\\FFmpeg\\bin;C:\\RBuildTools\\3.5\\bin;C:\\Program
Files\\R\\R-3.6.3\\bin;C:\\Users\\spenc\\AppData\\Local\\Microsoft\\WindowsApps;C:\\RBuildTools\\3.5\\;"



On 2020-03-28 23:07, Prof Brian Ripley wrote:

> On 29/03/2020 04:07, Simon Urbanek wrote:
>> Spencer,
>>
>> you could argue that Java is dead since Oracle effectively killed it
>> by removing all public downloads, but if you manage to get hold of a
>> Java installation then it works just fine with R. To my best
>> knowledge there has never been an issue if you installed rJava from
>> source. macOS Catalina has made binary distributions impossible due
>> to additional restrictions on run-time, but even that has been how
>> solved with the release of rJava 0.9-12, so please make sure you use
>> the latest rJava. In most cases that I have seen issues were caused
>> by incorrect configuration (setting JAVA_HOME incorrectly [do NOT set
>> it unless you know what you're doing!], not installing Java for the
>> same architecture as R etc.). If you have any issues feel free to
>> report them. rJava 0.9-12 has quite a few changes that try to detect
>> user errors better and report them so I strongly suggest users to
>> upgrade.
>
> There is OpenJDK, and https://adoptopenjdk.net provides binaries for
> macOS, including the preferred Java 11 LTS.  I just re-checked that,
> and after
>
> env
> JAVA_HOME=/Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/Home
> R CMD javareconf
>
> I was able to install from source and check rJava 0.9-12 in 4.0.0
> alpha.  For the CRAN binary of 3.6.3 I had to make sure I was using
> clang 7: 'clang' defaults to that in the Apple CLT which does not
> support -fopenmp -- but the binary package just worked.
>
> [All on Catalina.]

Thanks.  That worked on Catalina.  When installing OpenJDK on Windows
10, The default for "Set JAVA_HOME" was 'X';  I changed that to
install.  It didn't work at first, but did after I rebooted.


Thanks again to both Simon Urbanek and Prof. Ripley.  Spencer Graves

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Reply | Threaded
Open this post in threaded view
|

Re: status of Java & rJava?

Spencer Graves-3
       Tomas Kalibera kindly suggested I might have both 32- and 64-bit
Java installed, and it might be accessing the 32-bit.  He further
suggested:


        R CMD check Ecfun_0.2-4.tar.gz --no-multiarch


       That worked.  Thanks, Thomas.


       Spencer

On 2020-03-29 08:03, Spencer Graves wrote:

> I spoke too soon in saying that everything worked with OpenJDK: "R CMD
> check Ecfun_0.2-4.tar.gz" using "https://github.com/sbgraves237/Ecfun"
> worked fine on my Mac but failed with "error: DLL 'rJava' not found:
> maybe not installed for this architecture?" under Windows 10. 
> "00install.out" and "Sys.getenv('PATH')" follow.  "library(rJava)"
> seemed to work, and "help(pac='rJava') displays 0.9-12.  Suggestions? 
> Thanks, Spencer Graves
>
>
> * installing *source* package 'Ecfun' ...
> ** using staged installation
> ** R
> ** inst
> ** byte-compile and prepare package for lazy loading
> ** help
> *** installing help indices
> ** building package indices
> ** installing vignettes
> ** testing if installed package can be loaded from temporary location
> *** arch - i386
> Error: package or namespace load failed for 'Ecfun':
>  .onLoad failed in loadNamespace() for 'rJava', details:
>   call: library.dynam("rJava", pkgname, libname)
>   error: DLL 'rJava' not found: maybe not installed for this
> architecture?
> Error: loading failed
> Execution halted
> *** arch - x64
> ERROR: loading failed for 'i386'
> * removing 'C:/Users/spenc/Documents/R/Ecfun/Ecfun.Rcheck/Ecfun'
>
> ######################
>
> > Sys.getenv('PATH')
> [1] "C:\\Program Files\\R\\R-3.6.3\\bin\\x64;C:\\Program
> Files\\AdoptOpenJDK\\jdk-11.0.6.10-hotspot\\bin;C:\\Program
> Files\\Java\\jre1.8.0_241;C:\\Rtools\\bin;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\;C:\\WINDOWS\\System32\\OpenSSH\\;C:\\Program
> Files\\Microsoft VS Code\\bin;C:\\Program Files\\Git\\cmd;C:\\Program
> Files\\TortoiseSVN\\bin;c:\\programFiles\\ffmpeg\\ffmpeg-4.1\\;C:\\Program
> Files\\Pandoc\\;C:\\Program Files\\MiKTeX
> 2.9\\miktex\\bin\\x64\\;C:\\Users\\spenc\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Users\\spenc\\AppData\\Local\\GitHubDesktop\\bin;C:\\FFmpeg\\bin;C:\\RBuildTools\\3.5\\bin;C:\\Program
> Files\\R\\R-3.6.3\\bin;C:\\Users\\spenc\\AppData\\Local\\Microsoft\\WindowsApps;C:\\RBuildTools\\3.5\\;"
>
>
>
>
> On 2020-03-28 23:07, Prof Brian Ripley wrote:
>> On 29/03/2020 04:07, Simon Urbanek wrote:
>>> Spencer,
>>>
>>> you could argue that Java is dead since Oracle effectively killed it
>>> by removing all public downloads, but if you manage to get hold of a
>>> Java installation then it works just fine with R. To my best
>>> knowledge there has never been an issue if you installed rJava from
>>> source. macOS Catalina has made binary distributions impossible due
>>> to additional restrictions on run-time, but even that has been how
>>> solved with the release of rJava 0.9-12, so please make sure you use
>>> the latest rJava. In most cases that I have seen issues were caused
>>> by incorrect configuration (setting JAVA_HOME incorrectly [do NOT
>>> set it unless you know what you're doing!], not installing Java for
>>> the same architecture as R etc.). If you have any issues feel free
>>> to report them. rJava 0.9-12 has quite a few changes that try to
>>> detect user errors better and report them so I strongly suggest
>>> users to upgrade.
>>
>> There is OpenJDK, and https://adoptopenjdk.net provides binaries for
>> macOS, including the preferred Java 11 LTS.  I just re-checked that,
>> and after
>>
>> env
>> JAVA_HOME=/Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/Home
>> R CMD javareconf
>>
>> I was able to install from source and check rJava 0.9-12 in 4.0.0
>> alpha.  For the CRAN binary of 3.6.3 I had to make sure I was using
>> clang 7: 'clang' defaults to that in the Apple CLT which does not
>> support -fopenmp -- but the binary package just worked.
>>
>> [All on Catalina.]
>
> Thanks.  That worked on Catalina.  When installing OpenJDK on Windows
> 10, The default for "Set JAVA_HOME" was 'X';  I changed that to
> install.  It didn't work at first, but did after I rebooted.
>
>
> Thanks again to both Simon Urbanek and Prof. Ripley.  Spencer Graves
>
> ______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel