Core JavaScript 1.5 Reference:Global Objects:Packages:className
From MDC
Contents |
[edit] 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, NES2.0 |
[edit] Syntax
Packages.classname
Where classname is the fully qualified name of a Java class.
[edit] Description
You must use the className property of the Packages object to access classes outside the netscape, sun, and java packages.
[edit] Examples
[edit] 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.