I am trying out Java 8 in my project and I am stuck in an error related to my build process.
I am using ANT scripts and at some point i am using some javascript (embeded
One approach is to include
load("nashorn:mozilla_compat.js");
which supplies importClass.
On the other hand, you can use java.io.File, java.io.FileReader, ... directly without importing.
var File = java.io.File; var FileReader = java.io.FileReader;
This is backward compatible with Rhino.