Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8097584 improve JavaScript/Java bridge
  3. JDK-8097715

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

    Details

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

      Description

      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

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported: