Given by Marek Podgorny at Rome Lab Quarterly Review for CIV on October 1 96. Foils prepared 22 February 97
Outside Index
Summary of Material
Summary of Client-based WWW technologies |
Inter-technology communication Java/JavaScript/LiveConnect |
Role of JavaScript in LiveConnect |
Java - native language communication |
Java - plug-ins communication |
Java - JavaScript communication |
Applet - plug-in communication |
Outside Index Summary of Material
Java
|
native code - any language linkable with C |
Java allows you to:
|
Applet and plug-in learn about each other via JavaScript |
Inter-language capabilities |
Browser entities communication capabilities |
Browser entities cross-awareness |
The Java language uses native method modifier to declare a method implemented in another language.The native signature of the method as well as wrapper functions are machine generated using program javah.The class using native method needs to load the native library.
|
Netscape provides netscape.plugin.Plugin class which is the Java representation of the native plug-in.Specific for particular plug-in subclass of java.plugin.Plugin must be created and installed together with plug-in itself (NPX_PLUGIN_PATH).LiveConnect mechanism automatically instantiates Java class representing plug-in.Communication between this object and the plug-in is done the same way as in general case of Java-native code communication, except for:
|
JavaScript defines hierarchy of objects on HTML page.These objects are accessible from Java via LiveConnect mechanisms implemented in netscape.javascript.JSObject class.
|