I've tried the following: .jnew("java/sql/Date", 1912324L)) (using the rJava package) and get the following:
Error in .jnew("java/sql/Date", 1912324L) : java.lang.NoSuchMethodError:
Same error when I try .jnew("java/util/Date", 1912324L).
Any ideas about why this is happening?
NB: This works fine .jnew("java/lang/String", "s")
Obligatory session_info():
Session info --------------------------------------------------------------------------------------
setting value
version R version 3.2.1 (2015-06-18)
system x86_64, darwin14.4.0
ui RStudio (0.99.441)
language (EN)
collate en_AU.UTF-8
tz Australia/Sydney
Packages ------------------------------------------------------------------------------------------
package * version date source
crayon 1.3.0 2015-06-05 CRAN (R 3.2.1)
curl 0.9 2015-06-19 CRAN (R 3.2.1)
devtools * 1.8.0 2015-05-09 CRAN (R 3.2.1)
digest 0.6.8 2014-12-31 CRAN (R 3.2.1)
git2r 0.10.1 2015-05-07 CRAN (R 3.2.1)
memoise 0.2.1 2014-04-22 CRAN (R 3.2.1)
Rcpp 0.11.6 2015-05-01 CRAN (R 3.2.1)
rJava * 0.9-6 2013-12-24 CRAN (R 3.2.1)
rversions 1.0.1 2015-06-06 CRAN (R 3.2.1)
testthat * 0.10.0 2015-05-22 CRAN (R 3.2.1)
xml2 0.1.1 2015-06-02 CRAN (R 3.2.1)
And...running Java 1.6:
java version "1.6.0_65"
Java(TM) SE Runtime Environment (build 1.6.0_65-b14-466.1-11M4716)
Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-466.1, mixed mode)
Datetakes alongand you are passing anint. The other (deprecated) constructor works:.jnew("java/sql/Date", 115L,11L,10L).