I have an Eclipse RCP that interacts with java script. Now with Java 8, nashorn is used and code that depended on org.mozilla.javascript (plug-in org.mozilla.javascript_1.7.2.v201005080400.jar) must be changed to use jdk.nashorn.api.scripting.
But when i try to use this import in Eclipse, it does not see it
import jdk.nashorn.api.scripting.JSObject;
I get the error:
Access restriction: The type 'JSObject' is not API (restriction on required library '<...>\jre\lib\ext\nashorn.jar')
How can I make it visible in the classpath at compile time?