GUI Builder Runtime Classes

Applets and applications developed with GUI builder require GUI builder runtime classes to run outside of the Java WorkShop environment. The runtime classes consist of:

GUI builder uses runtime classes instead of duplicating runtime code in the application for a number of reasons:

How to Use the Runtime Classes

The runtime classes are located in the following directory:

On Solaris:
install-dir-path/JWS/classes/sunsoft/jws/visual/rt

On Microsoft Windows 95 and Windows NT:
install-dir-path\JWS\classes\sunsoft\jws\visual\rt

You can redistribute the GUI builder runtime classes with your applications. They can be copied into the directory containing your application's main class file, in which case they will be downloaded by the applet class loader of the browser or viewer. Or they can be installed locally on the client side and specified in the CLASSPATH variable.

To copy the runtime classes into an application directory, copy the contents of:

On Solaris:
install-dir-path/JWS/lib/visualrt.zip

On Microsoft Windows 95 and Windows NT:
install-dir-path\JWS\lib\visualrt.zip

into the directory that contains the main applet class. On a UNIX system, you can make a link to the sunsoft classes directory rather than an actual copy.

The first time you run an applet that requires the runtime classes, there is a delay while the runtime classes are down-loaded. Once the classes are cached, there is relatively little delay when subsequent applets are run, unless the applets use runtime classes not already used by the applets preceding it.

Performance is significantly better if the runtime classes are installed locally and accessed via the CLASSPATH variable. The time it takes to download the runtime classes is affected more by the number of classes than the size. Most browsers create a new connection to download each class, which is very slow.

Netscape Navigator

For Solaris only: If an applet is run in Netscape Navigator and the GUI builder runtime classes are installed locally, Navigator must be started after the CLASSPATH variable has been set.

If Navigator fails to find the GUI builder runtime classes, you will probably see one of the following error messages:

You may run into situations where it is necessary to restart Navigator if it has previously failed to find the runtime classes.

Use Zip Archives to Improve Performance

Netscape Navigator version 3.0 and later can load the runtime classes from a zip archive. Loading the classes from the zip archive reduces the time it takes your applet to start because a single, large file is downloaded from the server rather than many smaller ones.

To use this method, copy the archive file:

On Solaris:
install-dir/lib/visualrt.zip

On Microsoft Windows 95 and Windows NT:
install-dir\lib\visualrt.zip

to the applet's codebase directory along with the applet's class files.

See also:

Generating Java Source Code
Adding Operations to Components
What Is a Component Operation?
What Are Groups and Shadows?
More On Using Groups and Shadows

Visual Java GUI Builder API Documentation
Visual Java GUI Builder Runtime Packages
Class Hierarchy
Index of All Fields and Methods