ILOG JViews Diagrammer 8.1 Samples


ILOG JViews Diagrammer 8.1 includes a rich set of sample code to be used as reference for the development of an application. Samples fall into three areas: application samples, applet samples, and server-side samples.
All sample source code can be found in subdirectories of <installdir>/jviews-diagrammer81/samples.

ILOG JViews Diagrammer 8.1 is based on the Java Platform, Standard Edition. To run an ILOG JViews Diagrammer 8.1 client application, you need the Java Platform, Standard Edition Runtime Environment. To run an ILOG JViews Diagrammer 8.1 server-side application within the provided Tomcat server, you need to run Tomcat with a Java SE installation (see http://java.sun.com/javase). To see an ILOG JViews Diagrammer 8.1 sample applet, you need to have the Java Plug-in installed in your browser (see http://java.sun.com/products/plugin/).

Running the Samples

The samples provided in the ILOG JViews Diagrammer 8.1 distribution are already compiled so you do not need to compile them to be able to run them. If you want to modify a sample and recompile it, every sample contains a build.xml file that allows you to compile and run the sample. This file is an Ant project file. Ant is a Java-based build tool that is developed by the Apache Software Foundation. (See http://ant.apache.org.) The ILOG JViews Diagrammer 8.1 distribution contains a version of Ant that you can use if you do not have Ant already installed on your computer. The Ant installation can be found in the <installdir>/jviews-framework81/tools directory.

To use Ant, you must set the following environment variables:

JAVA_HOME to point to the Java Platform, Standard Edition you are using. This release works with Java SE 5 and higher.

The build.bat and build.sh scripts use the version of Ant provided in the ILOG JViews Diagrammer distribution. If you use these scripts, you do not need to set any other environment variables. If you want to run Ant directly, for example to use your own Ant installation, then you will need to set:

ANT_HOME to point to your Ant directory.

Add the Ant bin directory to your PATH.

To recompile a sample, go to the samples directory and do:

> build.bat (or build.sh on UNIX and Linux)

If you have ant on your path then you can just run Ant directly:

> ant build

To remove compiled classes do:

> clean.bat (or clean.sh on UNIX and Linux)

Or using Ant directly:

> ant clean

The samples that can run as applications also have a 'run' target in their build.xml files and run.[bat|sh] batch files:

> run.bat (or run.sh on UNIX and Linux)

Or using Ant directly:

> ant run

To know how to use the build.xml file of a sample use:

> ant -projecthelp

You can read the Ant documentation at http://ant.apache.org/manual/index.html.

Copying a demo

Demos that run as an application, this excludes applets and server-side demos, can be copied by copying the demo directory wherever you like. Once the demo is copied you must either change the jviews.home property in the Ant build file, or set the environment variable JVIEWS_HOME, to point to the installation directory where your ILOG JViews products are installed.

Running the Server-Side Samples

The ILOG JViews Diagrammer 8.1 distribution contains several samples that show the use of ILOG JViews Diagrammer 8.1 running in a Web client. To run the server-side samples the ILOG JViews Diagrammer 8.1 library requires a Web Server that provides Java Servlet 2.3 (or later) and JSP 1.2 technology (or later). The Tomcat Web server is supplied with the ILOG JViews Diagrammer distribution so that you do not need to download a Web server to run these samples. Tomcat is the official reference implementation of the Servlet and JSP specifications. To get more information on Tomcat go to http://tomcat.apache.org/.

For your convenience, all server-side samples are already installed and ready to run under Tomcat. All you have to do is to run the Tomcat Web server.

Here are the steps for running the samples on the Tomcat Web server supplied with the ILOG JViews Diagrammer 8.1 installation:

Note that the DHTML/Ajax samples require one the following browsers:

The server-side samples contain a WAR file (Web Archive) that allows you to easily install the sample. You can check the latest list of servers that support Servlet 2.3 and JSP 1.2 or later at http://java.sun.com/products/servlet/industry.html.

Running the Samples without an X Server

The ILOG JViews Diagrammer 8.1 server-side components can run with the headless support that is built into Java SE. For more information on this feature, please refer to the Java SE release notes. You can also run with a virtual X server like Xvfb (X Virtual Frame Buffer) if you are not running on Windows. This solution is described on the Sun Web site.

Customer Support | Help
Copyright © 1987-2007 ILOG S.A. All rights reserved.   Documentation homepage.    Legal terms.