Live Connect Kevin Andrusky Stephen Bodnar Darshan Gill
Live. Connect Kevin Andrusky Stephen Bodnar Darshan Gill
Overview Introduction Java. Script to Java. Script Controlling Plug-ins to Java. Script
Introduction Developed by Netscape to permit Communication between: Java l Java. Script, and l Plug-ins l Implemented in Netscape 3. 0 Later implemented by Microsoft for Internet Explorer 4. 0
Java. Script to Java
Controlling Applets
Calling Java Methods
Type Conversions Java. Script Java number float boolean string String Other JSObject
Type Conversions
Java to Java. Script
Preparation
JSObject API (part) get. Window(Applet a) Retrieves the window handle. get. Member(String name) Retrieves a named member of a Java. Script object. this. name set. Member(String name, Object value) Sets a named member of a Java. Script object. this. name = value call(String Calls a Java. Script method. Name, Object method. args[]) This. method. Name (arg[0] …)
Example
Type Conversions Javascript Numeric types Number Boolean JSObject Original Object Array Other Java Object Wrapper
Controlling Plug-ins
Prerequisites
Controlling Plug-ins
Plug-ins to Java Complicated l Involves combining C and Java See: http: //www. netscape. com/eng/mozilla/3. 0/handbook/plugins/pjava. htm
Plug-ins to Java. Script If Plug-in is a subclass of netscape. plugin. Plugin l Same as Java to Java. Script methods
Conclusions Powerful technology, though not widely used. Rather antiquated, Netscape 6 doesn’t have full support for Live. Connect anymore Newer technologies? l Flash?
Live. Connect Examples Java To Java. Script: l http: //www. apl. jhu. edu/~hall/java/Java. Script-from-Java. html Java. Script To Java: l l l http: //www. netscape. com/eng/mozilla/3. 0/handbook/javascript/livecon. htm http: //www. apl. jhu. edu/~hall/java/Java-from-Java. Script. html http: //www. webreference. com/javascript/961202/part 01. html
Live. Connect Info References We Used • • • http: //www. netscape. com/eng/mozilla/3. 0/handbook/javascript/livecon. htm http: //www. netscape. com/eng/mozilla/3. 0/handbook/plugins/ http: //developer. netscape. com/docs/manuals/communicator/jsref/pkg. htm http: //www. js-examples. com/javascript/core_js 15/lc. php 3 http: //developer. netscape. com/docs/manuals/signedobj/trust/owp. htm http: //java. sun. com/j 2 se/1. 3/docs/guide/plugin/security. html
- Slides: 21