please dont rip this site

JavaScript: The Definitive Guide

Previous Chapter 19 Next
 

19. LiveConnect: JavaScript and Java

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).

19.1 Overview of LiveConnect

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.

Figure 19.1: LiveConnect glues together JavaScript, applets, and plug-ins

[Graphic: Figure 19-1]


Previous Home Next
Compatibility Through CGI Scripts Book Index LiveConnect Data Types

HTML: The Definitive Guide CGI Programming JavaScript: The Definitive Guide Programming Perl WebMaster in a Nutshell

file: /Techref/language/JAVA/SCRIPT/definitive/ch19_01.htm, 6KB, , updated: 2019/10/14 15:00, local time: 2024/12/18 23:57,
TOP NEW HELP FIND: 
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?
Please DO link to this page! Digg it! / MAKE!

<A HREF="http://massmind.org/techref/language/JAVA/SCRIPT/definitive/ch19_01.htm"> [Chapter 19] LiveConnect: JavaScript and Java</A>

After you find an appropriate page, you are invited to your to this massmind site! (posts will be visible only to you before review) Just type a nice message (short messages are blocked as spam) in the box and press the Post button. (HTML welcomed, but not the <A tag: Instead, use the link box to link to another page. A tutorial is available Members can login to post directly, become page editors, and be credited for their posts.


Link? Put it here: 
if you want a response, please enter your email address: 
Attn spammers: All posts are reviewed before being made visible to anyone other than the poster.
Did you find what you needed?

 

Welcome to massmind.org!

 

Welcome to massmind.org!

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  .