In this tutorial we will solve compilation error Access restriction: The type 'NashornScriptEngine' is not API (restriction on required library 'C:\Program Files\Java\jdk1.8.0_05\jre\lib\ext\nashorn.jar')
SOLUTION TO > We Access restriction: The type 'NashornScriptEngine' is not API (restriction on required library 'C:\Program Files\Java\jdk1.8.0_05\jre\lib
\ext\nashorn.jar') >
Step 1.1:
click Windows, Preferences,
Step 1.2:
type error,
Go to Errors/warnings (which is under Java > Compiler > Errors/warnings)
Step 1.3:
type deprecated,
In Deprecated and restricted API -
- In Forbidden reference (access rules ) - Earlier Errors is selected. Now, select ignore.
And now compilation error Access restriction: The type 'NashornScriptEngine' is not API (restriction on required library 'C:\Program Files\Java\jdk1.8.0_05\jre\lib\ext\nashorn.jar') is solved.