Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8148922

packages from "net.*" and non-com are not loaded

XMLWordPrintable

      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.

            psonal Pallavi Sonal (Inactive)
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: