Need to update to Java8 for RWeka to work.
I get the solution from this blog.
In addition to installing the Java 8, java 8 development kit also needs to be installed.
There is also some error when trying to work with M5P function in RWeka package. Stackoverflow comes to the rescue as per usual.