Commit 6f7d4ac
committed
Support OpenJDK flavor of Rhino
Previously, our load function would fail on OpenJDK with the cryptic error:
sun.org.mozilla.javascript.EvaluatorException: Function importClass must be called with a class; had "[JavaPackage sun.org.mozilla.javascript.internal.Context]" instead.
Which was caused by the fact that the wrong fully qualified Context class name
was returned: OpenJDK uses sun.org.mozilla.javascript.Context, whereas Oracle
Java uses sun.org.mozilla.javascript.internal.Context.
This may remain a lurking issue with OpenJDK-8-flavored Nashorn... but I don't
have an OpenJDK 8 installation to use for testing at this moment. Hopefully
this commit will be enough of a hint to fix similar problems in the future.1 parent d7aaf0a commit 6f7d4ac
File tree
1 file changed
+7
-2
lines changed- src/main/java/org/scijava/plugins/scripting/javascript
1 file changed
+7
-2
lines changedLines changed: 7 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
156 | 156 | | |
157 | 157 | | |
158 | 158 | | |
159 | | - | |
160 | | - | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
161 | 166 | | |
162 | 167 | | |
163 | 168 | | |
| |||
0 commit comments