Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

className

Summary

The fully qualified name of a Java class in a package other than netscape, java, or sun that is available to JavaScript.

Property of Packages
Implemented in JavaScript 1.1

Syntax

Packages.classname

Where classname is the fully qualified name of a Java class.

Description

You must use the className property of the Packages object to access classes outside the netscape, sun, and java packages.

Examples

Example: Using Packages.classname

The following code accesses the constructor of the CorbaObject class in the myCompany package from JavaScript:

var theObject = new Packages.myCompany.CorbaObject()

In this example, the value of the className property is myCompany.CorbaObject, the fully qualified path name of the CorbaObject class.

Document Tags and Contributors

 Contributors to this page: fscholz, ethertank, Maian, Marcoos, Dria
 Last updated by: fscholz,