ScriptEngine engine = manager.getEngineByName("js");
FileReader reader = new FileReader("<location>\\Test.js"); //I DONT WANT TO DO IT THIS WAY
Invocable inv = (Invocable) engine;
I searched on internet and found that I can use netscape.JSObject in my Applet class for the purpose. But it seems the package is going to be dropped in future releases. I am looking for an alternative.