I encountered this problem quite some time ago, and have been stuck using Java 7 still.
Fortunately, it is still available.
There is this, if anyone wants to try:
https://wiki.openjdk.java.net/display/Nashorn/Rhino+Migration+GuideIt describes how Rhino has been replaced by Nashorn (whatever that is).
Supposedly there is some compatibility module which enables you to use importClass,
but I could not get it to work.
I'm surprised the Union Developers never encountered this on their own,
since for any new installation, the default Java is now version 8 or higher.
You have to do some work to get Java 7 installed.