provide JavaScript access to Java classes and packages (Package object)

XMLWordPrintable

    • Type: Sub-task
    • Resolution: Won't Fix
    • Priority: P4
    • None
    • Affects Version/s: None
    • Component/s: javafx
    • web

      We need a convention so JavaScript can reference Java packages, classes, create new objects, and reference static members.
      The LiveConnect way is to use a global Packages objects. For example:
         var myString = new Packages.java.lang.String("Hello world");
      Traditionally, java and netscape are prefined as providing shortcuts; we might also consider sun, javax, and javafx.

      http://jdk6.java.net/plugin2/liveconnect/#PER_APPLET_PACKAGES
      http://jdk6.java.net/plugin2/liveconnect/#DEPRECATED_FUNCTIONALITY
      https://developer.mozilla.org/en/Core_JavaScript_1.5_Guide/LiveConnect_Overview#The_Packages_Object

            Assignee:
            Unassigned
            Reporter:
            Per Bothner (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: