Contents:
Overview of LiveConnect
LiveConnect Data Types
LiveConnect Data Conversion
JavaScript Conversion of JavaObjects
Scripting Java with JavaScript
Using JavaScript from Java
Working with Java in Internet Explorer
Summary
Navigator 3.0 opens up a tremendous new set of programming possibilities by allowing JavaScript to communicate with the Java virtual machine running in the browser. Netscape's name for this new JavaScript-to-Java and Java-to-JavaScript communication facility is "LiveConnect." This chapter explains how LiveConnect works, and how you can use it in your programs.
Note that Internet Explorer 3.0 does not support LiveConnect. Instead, it treats Java applets as ActiveX objects and allows them to be scripted through that mechanism. Doing so is described briefly at the end of this chapter.
To use LiveConnect, you'll need to understand Java programming. This chapter assumes you have at least a basic familiarity with Java (see Java in a Nutshell, by David Flanagan, and Exploring Java, by Patrick Niemeyer and Joshua Peck, both published by O'Reilly).
LiveConnect is the mechanism that allows JavaScript and Java to work together. Using LiveConnect, all of the following are possible:
The surprising thing about LiveConnect is how easy it makes it to accomplish these difficult things. LiveConnect automatically handles all the required communication and data type conversion that must take place to allow Java and JavaScript to work together. LiveConnect is an underlying communication framework that opens up all sorts of possibilities for communication among JavaScript programs, Java applets, and Java-enabled plug-ins. LiveConnect can be thought of as the glue that ties these things together. Figure 19.1 illustrates this.
file: /Techref/language/JAVA/SCRIPT/definitive/ch19_01.htm, 6KB, , updated: 2019/10/14 15:00, local time: 2024/12/18 23:57,
18.119.138.244:LOG IN
|
©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions? <A HREF="http://massmind.org/techref/language/JAVA/SCRIPT/definitive/ch19_01.htm"> [Chapter 19] LiveConnect: JavaScript and Java</A> |
Did you find what you needed? |
Welcome to massmind.org! |
Welcome to massmind.org! |
.