Before You Begin · Setting your CLASSPATH
Installation and File Descriptions · Java Basics · JDK 1.0.2 and JDK 1.1
JClass LiveTable and Java Beans
Be sure that your system and development environment (specifically the CLASSPATH) are set up correctly before installing JClass LiveTable; you should already be able to compile and run simple Java applications or applets. For help configuring your environment for Java, consult the Java(tm) Developer's Kit ( JDK) documentation at http://www.javasoft.com/products/jdk/index.html .
A good source of general information on Java and Java Beans is the Frequently Asked Questions (FAQ) list that can be found at the JavaSoft Web site at http://www.javasoft.com/products/jdk/faq.html and http://www.javasoft.com/beans/FAQ.html respectively.
In order to use your JClass components, you must set the CLASSPATH environment variable of your operating system. The CLASSPATH points to the location(s) of class files on your computer or over a Local Area Network (LAN).
Note: If you installed the self-extracting MS-Windows version of JClass LiveTable, your CLASSPATH environment variable was automatically set up during the installation process.
The CLASSPATH statement consists of directory paths to the location(s) of compiled Java class files on your computer or over a LAN. For JClass LiveTable, the statement must include a pointer to the ZIP file containing the JClass LiveTable classes. The following explains how to set the CLASSPATH environment variable under both Unix and Windows.
If you have installed JClass LiveTable in the default location, C:\ jclass\ table[xxx]\ jclass\ table, (where [ xxx] is the JClass LiveTable version number) the CLASSPATH would be:
C:\jclass\table[xxx]\jclass\table\lib\jctable[xxx]-classes.zip
If you have class files in more than one location, these are separated by semicolons:
C:\jclass\table[xxx]\jclass\table\lib\jctable[xxx]-classes.zip; C:\myclasses
If you want to be able to compile Java programs in the same directory as your class files are located, you must add a period to the CLASSPATH statement:
C:\jclass\table[xxx]\jclass\table\lib\jctable[xxx]-classes.zip;.
The JClass LiveTable distribution includes additional classes in separate directories from the ZIP file. For the Java compiler to locate these files, you will also have to specify the root directory containing all of the classes; this is typically C:\
C:\;C:\jclass\table[xxx]\jclass\table\lib\jctable[xxx]-classes.zip;.
The following explains Windows version-specific steps for setting the CLASSPATH:
Add the CLASSPATH statement to your autoexec.bat file using the set command ([x xx] is the JClass LiveTable version number):
set CLASSPATH=C:\;C:\jclass\table[xxx]\jclass\table\lib\ jctable[xxx]-classes.zip;.;{other class file locations}
Add the CLASSPATH environment variable to a Windows NT system by opening the System dialog box in the Control Panel, and searching the User Variables ( User Environment Variables in Windows NT 3.51) for an existing CLASSPATH:
C:\[existing];C:\;C:\jclass\jctable[xxx]\jclass\table\lib\ jctable[xxx]-classes.zip;.
CLASSPATH
C:\;C:\jclass\jctable[xxx]\jclass\table\lib\ jctable[xxx]-classes.zip;.
Note to Browser Users: If you set the CLASSPATH for your entire session, the CLASSPATH will be picked up by the Web browser as well.
Sun's Java JDK automatically sets the CLASSPATH environment variable in your startup file when you install the JDK. Enter the following command to see the current setting:
echo $CLASSPATH
To set the CLASSPATH environment variable in Unix to point to your JClass LiveTable classes, use a setenv command (where [ xxx] is the JClass LiveTable version number):
setenv CLASSPATH .:/usr/local/jclass/table[xxx]/ jclass/table/lib/jctable[xxx]-classes.zip
You can make the environment variable setting permanent by putting it in your startup file, (for example the .cshrc file for C shell users). To append the existing CLASSPATH in your startup file, add the following to the line specifying the CLASSPATH variable:
:/usr/local/jclass/table[xxx]/jclass/table/lib/ jctable[xxx]-classes.zip
The colon at the beginning of the line separates different class file locations in the CLASSPATH environment variable.
If you want to be able to compile Java programs in the same directory as your class files are located, you must add a period to the CLASSPATH statement:
/usr/local/jclass/table[xxx]/jclass/table/lib/ jctable[xxx]-classes.zip:.
The JClass LiveTable distribution includes additional classes in separate directories from the jctable[xxx]-classes.zip file. For the Java compiler to locate these files, you will also have to specify the root directory containing all of the classes; this is typically your user directory (for example usr/local/):
/usr/local/bin/classes:usr/local/jclass/table[xxx]/jclass/table/lib/ jctable[xxx]-classes.zip:.
If you are using a development environment that can import a JAR file, use the JAR file in the / lib directory of your JClass product. Note, however, that some Java Bean environments have trouble resolving conflicts between the CLASSPATH and the imported JAR file. To run your program using the JAR file, you may have to remove the jctable[xxx]-classes.zip from your CLASSPATH.
JClass LiveTable is distributed in several forms, for different platforms and different versions of the JDK. For example, one distribution is in EXE format for JDK 1.0.2, another is in compressed TAR format for JDK 1.1. Once you obtain the distribution file you need, install JClass LiveTable:
Extracting or installing the JClass LiveTable distribution creates the following core directory tree on your system (different distributions may contain additional directories or files):
The jclass/table/api/ directory contains hypertext documentation of all of the JClass LiveTable classes in HTML format. To view the documentation, open jclass_table.html in a Frames-capable browser (such as Netscape Navigator or Internet Explorer). If you do not have a Frames-capable browser, open table_default.html instead, which explains how the JClass LiveTable API is arranged; then proceed to table_toc.html, the Table of Contents file.
The jclass/table/examples/ and jclass/table/demos/ directories contain sample Java programs that use JClass LiveTable components. Each directory contains the file index.html, which provides a convenient way of accessing the Java applets in the directory. The Java programs can also be run directly from the command prompt. They can also be accessed through the HTML documentation from jclass_table.html.
The jclass/table/lib/jctable[xxx]-classes.zip file ([x xx] is the JClass LiveTable version number) contains all of the JClass LiveTable Java .class files. Your CLASSPATH environment variable needs to point to this file. See the section on Setting your CLASSPATH for more information.
The jclass/table/lib/jctable[xxx].jar file contains the same JClass LiveTable Java .class files as the -classes.zip file, but in Java Archive ( JAR) format. The JAR formatis used by many Integrated Development Environments (IDEs) for importing Java Beans.
The file jclass/readme.txt is an ASCII text file containing information about the files contained in this release. This file can be viewed through any text viewer (such as Notepad or WordPad) or a word processor.
The core of JClass LiveTable is the jctable[ xxx] -classes.zip file ([ xxx] is the JClass LiveTable version number). This file contains all of the compiled .java files that comprise the JClass LiveTable Java components. If you plan to use the JClass LiveTable release files in a development environment, you do not have to extract (unarchive) the classes ZIP file because Java can automatically read the contents of this file. If you are using the JClass LiveTable release files in a server-based environment, however, you must extract (unarchive) the classes ZIP file so that the server can access the individual class files.
Java is both a compiled and an interpreted language. After writing a Java program using a text editor, save it as a source file with the extension .java. When this source file is run through the Java compiler, it compiles the file into a .class file. Unlike .exe files, these compiled .class files are not directly executable under any operating system, because they do not contain machine-language code that can be understood directly by the microprocessor. Instead, they are compiled into a byte-code format consisting of machine-language instructions designed for a virtual microprocessor. This virtual microprocessor is the Java Virtual Machine, which interprets the byte-code into a machine-language code that can be understood by your system's microprocessor. As long as the Java Virtual Machine software exists for a computing platform, any Java programs you create will be able to run on that platform.
If the Java compiler and class files are installed in the standard places (typically \ JDK\bin\) you can compile a Java program by entering the following at a prompt:
javac MyJavaProgram.java
Java allows for two distinct program types: stand-alone applications and applets. Stand-alone applications can be run directly on a system containing the Java interpreter program (java), while applets can be inserted and run from Web pages when viewed through a Java-capable browser. JClass components can be used with both types of Java programs. Ensure you can compile and run simple Java applications or applets before you begin to use JClass LiveTable. Consult the Java JDK documentation for assistance in determining the location of the Java compiler (javac) and the Java .class files.
The Java Development Kit ( JDK) 1.0.2 and JDK 1.1 are two entirely different versions of the JDK. Applets and applications written for JDK 1.1 will not run in a JDK 1.0.2 environment. Applets and applications written for JDK 1.0.2 should run in a JDK 1.1 environment, but most do not run well.
All JClass products work with both JDK 1.1 and JDK 1.0.2. However, you must download the correct version for your environment.
JClass products made with JDK 1.0.2 are referred to as the " Transitional Bean" version of the product, and this is denoted by the capital letter "T" in the version name of the product (that is, JClass LiveTable 3.0T) and of the name of the file containing the JClass product's .class files (e.g. jctable[xxx]T-classes.zip -- where [ xxx] is the version number of the product). The JDK 1.1 version of JClass products drop the capital letter "T" from the version name of the product and from the file containing the compiled .class files. If you are developing programs under JDK 1.0.2, ensure you are using the Transitional Bean version of the product, and if you are using JDK 1.1, ensure you are using the non-Transitional Bean version of the product.
Note: At the time of writing, Microsoft Internet Explorer 4.0 supports JDK 1.1 applets. Netscape has released a beta patch for its Navigator Web browser that supports JDK 1.1. You can also use the JDK 1.1 appletviewer or Sun's HotJava browser (freely available at http://www.javasoft.com/nav/download/index.html ) to display HTML pages containing JDK 1.1 applets.
If you are unsure of the version of the JDK on your system, type the following at the command prompt:
java -version
It will display the version number of the JDK on your system.
To determine the version of JClass LiveTable you are using on your system, run the version program provided:
java jclass.table.JCVersion
It will display the JClass LiveTable version number.
The new Java Development Kit ( JDK) 1.1 provides a number of new features and improvements over the previous release. In particular, it includes the ability to create "Bean" components.
Java Beans is a specification for reusable, pre-built Java software components. It is designed to be a full platform-independent component model written for the Java programming language. It enables developers to write components that can be re-used in other applications, reducing the total time needed to write complete applications. JClass LiveTable components are Java Bean-compliant.