Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7c319e3 commit 56c19d7Copy full SHA for 56c19d7
src/com/winterbe/java8/Nashorn3.java
@@ -2,7 +2,6 @@
2
3
import javax.script.ScriptEngine;
4
import javax.script.ScriptEngineManager;
5
-import java.io.FileReader;
6
7
/**
8
* Working with java types from javascript.
@@ -13,7 +12,7 @@ public class Nashorn3 {
13
12
14
public static void main(String[] args) throws Exception {
15
ScriptEngine engine = new ScriptEngineManager().getEngineByName("nashorn");
16
- engine.eval(new FileReader("res/nashorn3.js"));
+ engine.eval("load('res/nashorn3.js')");
17
}
18
19
0 commit comments