-
Type:
Bug
-
Resolution: Not an Issue
-
Priority:
P4
-
None
-
Affects Version/s: 8u60
-
Component/s: core-libs
-
generic
-
generic
A DESCRIPTION OF THE REQUEST :
I've tried to use packages from "ch.ethz.csb.*" (my project on behalf of http://ethz.ch) as well as "net.miginfocom.swing.MigLayout" but looks like all of those are ignored even if present in the class path.
JUSTIFICATION :
It unreasonably limits what can be done in Javascript (anyone can create a com.* package so security is not of a concern).
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
In javascript running in Nashorn I could do:
var layout = Java.type("net.miginfocom.swing.MigLayout")("foo, bar")
ACTUAL -
ClassNotFound exception
---------- BEGIN SOURCE ----------
ScriptEngine engine = new ScriptEngineManager().getEngineByName("nashorn");
engine.eval("var layout = Java.type("net.miginfocom.swing.MigLayout")("foo, bar");");
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
I can pass constructor references as custom bindings but that's at least awkward.
I've tried to use packages from "ch.ethz.csb.*" (my project on behalf of http://ethz.ch) as well as "net.miginfocom.swing.MigLayout" but looks like all of those are ignored even if present in the class path.
JUSTIFICATION :
It unreasonably limits what can be done in Javascript (anyone can create a com.* package so security is not of a concern).
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
In javascript running in Nashorn I could do:
var layout = Java.type("net.miginfocom.swing.MigLayout")("foo, bar")
ACTUAL -
ClassNotFound exception
---------- BEGIN SOURCE ----------
ScriptEngine engine = new ScriptEngineManager().getEngineByName("nashorn");
engine.eval("var layout = Java.type("net.miginfocom.swing.MigLayout")("foo, bar");");
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
I can pass constructor references as custom bindings but that's at least awkward.