Accessing Java Objects from JavaScript

In Netscape Navigator you can use the LiveConnect technology to access Java packages, classes, methods, and variables directly from JavaScript code. You do not need to write an applet with public functions in order to access Java.

When you invoke the constructor for a Java class in JavaScript, LiveConnect creates a wrapper object for that Java object. Invoking methods and accessing properties for the wrapper object causes methods to be invoked and properties to be accessed in the Java object.

Behind the scenes, the following special LiveConnect objects are used as wrappers for Java objects:

  • JavaArray is a wrapped Java array that you access from JavaScript code.

  • JavaClass is a reference to a Java class in ...

Get LDAP Programming with Java™ now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.