ChartDirector 6.1 (Java Edition)

Installation


ChartDirector for JSP/Java contains the ChartDirector Java library, complete documentation, and sample code as JSP and as standalone Java programs.

ChartDirector for JSP/Java is distributed as a zip file, with a directory structure compatible with that of a JSP Web Application Archive (WAR). This allows ChartDirector for JSP/Java to be directly installed to a JSP web server as a web application.

Installing ChartDirector as a JSP Web Application

If you are planning to use ChartDirector in a JSP web server, you may consider to install ChartDirector as a JSP web application. To do this, simply rename the ".zip" file extension to ".war" and use it as a WAR. Virtually all JSP web servers support installing WAR. Please refer to your web server's documentation for details.

The advantages of installing ChartDirector as a web application are that the system will be set up automatically for running the sample code and testing ChartDirector. You can also easily uninstall ChartDirector by uninstalling the web application.

After installing ChartDirector as a JSP web application, you can access the ChartDirector documentation and sample code using:

http://server_name/context_path

where "context_path" is the path of the servlet context that you use during installation.

Most web servers will automatically extract (or unzip) the WAR file during installation. However, some web servers, such as Tomcat configured with unpackWARs="false", may use the WAR file directly without extracting it. In this case, ChartDirector will work normally, but you will be unable to modify the sample code and experiment with ChartDirector.

If your web server does not automatically extract WAR files, you may unzip the WAR file to a directory first, and install the extracted directory to the web server. You may then modify the sample code and experiment with ChartDirector.

Installing ChartDirector in a JSP Web Server Manually

If you do not want to automatically install ChartDirector using WAR, you can manually install the ChartDirector sample code by copying the necessary files.

For some JSP web servers, you may need to restart the web application after modifying the "WEB-INF/lib" subdirectory.

You may then access the sample code using:

http://server_name/context_path/jspdemo/index.htm

Using ChartDirector in Your Own Web Application

To use ChartDirector in your own web application, you need to:

Installing ChartDirector for Standalone Applications

If you are planning to use ChartDirector for standalone Java programs, simply extract the ChartDirector for JSP/Java distribution to an empty directory. You can then compile and run the standalone sample programs in the "javademo" subdirectory:

[Microsoft Windows Command Shell Syntax]
javac -classpath "ChartDirector_s.jar;." ChartDirectorDemo.java
java -classpath "ChartDirector_s.jar;." ChartDirectorDemo

[Typical Linux/UNIX Command Shell Syntax]
javac -classpath ChartDirector_s.jar:. ChartDirectorDemo.java
java -classpath ChartDirector_s.jar:. ChartDirectorDemo

In the above, "ChartDirector_s.jar" is a light-weight version of the full "ChartDirector.jar" library. The light-weight version is for systems that support Java GUI. The full version is for systems that may not have GUI support (eg. some Linux/UNIX servers).

Using ChartDirector in Your Own Standalone Application

To use ChartDirector in your own application, you need to include the ChartDirector Java library in your application by including the ChartDirector library in your class path or Java project.

For Java GUI applications, you may use the light-weight version of the "ChartDirector_s.jar" located in the "javademo" subdirectory.

If you are writing a Java program that may run on a "headless" system (that is, a computer without a GUI, such as some Linux/UNIX serves), but the Java VM is not started with headless mode support, you can use the full version "ChartDirector.jar" located in the "WEB-INF/lib" subdirectory. The full "ChartDirector.jar" contains an internal font system acting as a backup to the Java font system. You may refer to Font Specification for more details.

Javadoc for IDE Integration

Currently, ChartDirector documentation is not in Javadoc format. Instead, it is in both CHM and HTML formats, with the HTML format being similar to the CHM format. The CHM format is preferred because it has integrated search facility, better indexing features, supports bookmarks, and is easier to print.

If you are currently reading the ChartDirector documentation in HTML format, and you are using a Microsoft Windows computer, you are recommended to download the CHM documentation from http://www.advsofteng.com/download.html.

Some integrated development environments (IDE) can import "Javadoc" and use it to provide "intellisense" tool tips in the source code editor. To support these features, ChartDirector includes "Javadoc" in the "ide_javadoc" subdirectory. Note that the "Javadoc" does not contain any text for human reading. It just contains the ChartDirector API prototypes to allow the IDE to pop up prototypes with proper parameter names in "intellisense". For human reading, please use the CHM (recommended) or standard HTML documentation.

Installing the ChartDirector License

If you have purchased a license to use ChartDirector, you should have a license key delivered to your via email and postal mail.

If your license key is for upgrading from a previous version of ChartDirector, you need to append the upgrade license key to the previous version license key, and use the combined license key.

There are two alternative methods to install the license key.