Can't install RWeka package in R studio

 install.packages("RWeka")

There is a binary version available but the source version is later:
      binary source needs_compilation
RWeka 0.4-26 0.4-37             FALSE

installing the source package ‘RWeka’

trying URL 'https://cran.rstudio.com/src/contrib/RWeka_0.4-37.tar.gz'
Content type 'application/x-gzip' length 413401 bytes (403 KB)
==================================================
downloaded 403 KB

Warning in strptime(xx, f <- "%Y-%m-%d %H:%M:%OS", tz = tz) :
  unknown timezone 'zone/tz/2018c.1.0/zoneinfo/America/New_York'
* installing *source* package ‘RWeka’ ...
** package ‘RWeka’ successfully unpacked and MD5 sums checked
** R
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded
Error : .onLoad failed in loadNamespace() for 'RWeka', details:
  call: .jnew("weka.core.WekaPackageManager")
  error: java.lang.UnsupportedClassVersionError: weka/core/WekaPackageManager : Unsupported major.minor version 52.0
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/Library/Frameworks/R.framework/Versions/3.3/Resources/library/RWeka’
Warning in install.packages :
  installation of package ‘RWeka’ had non-zero exit status

The downloaded source packages are in
	‘/private/var/folders/7n/5cg3f3jj49j1hf8k8xy6w__80000gn/T/RtmpUGMKC8/downloaded_packages’
library("RWeka")
Error in library("RWeka") : there is no package called ‘RWeka’

Your Java is not compatible with the version that is required by Weka. Try to read documentation and/or update Java to the latest version.

1 Like

Thanks for your help!
but I checked my Java version and seems updated already. I installed java this year. I still have the issues install RWeka. Is my Java correct version?

Cuiming