GLG JAVA DEMOS The GlgDemoArchive.zip file is a jar archive that contains an image of the web site to run the Glg Java demos from a local filesystem without an access to a network. The Glg Java Demos may be run either in a web browser, or as stand-alone java programs. DOWNLOADING AND EXTRACTING THE DEMO FILES To run the demos, download the GlgDemoArchive.zip file and extract the files using the jar utility: jar xvf GlgDemoArchive.zip This will extract the following files: java_demos - the top-level demo directory index.html - the starting point for running the demos in a browser demos_java1.html - the starting point for running Java1 demos demos_java2.html - the starting point for running Java2 demos *.gif - gif files used by index.html java.html - description of the Glg Toolkit for Java java1 - Java1 demo directory *.html - demo html files *.java - Java1 source code files for the demos *.glg and *.g - GLG drawing files GlgEval.jar - Glg class library for Java1 GlgDemo.jar - demo class files for Java1 java2 - Java2 demo directory *.html - demo html files *.java - Java2 source code files for the demos *.glg and *.g - GLG drawing files GlgEval2.jar - Glg class library for Java2 GlgDemo2.jar - demo class files for Java2 RUNNING THE GLG JAVA DEMOS IN A JAVA1-ENABLED BROWSER Start your Web browser, load the java_demos/index.html file, select Java1 and click on the Java demo you want to run. RUNNING THE GLG JAVA DEMOS IN A JAVA2-ENABLED BROWSER You need a Java2-enabled browser to run Java2 and Swing demos. If you use Netscape or IE browsers, you'll need to install Sun's Java2 plug-in to enable Java2 in the browser. To run the demos, start your Web browser and load the java_demos/index.html file. Slect Java2, then click on the Java demo you want to run. RUNNING THE GLG JAVA DEMOS AS STAND-ALONE JAVA PROGRAMS You can run the demos by either browsing the demos in a web browser (starting with index.html), or starting the demos as stand-alone Java programs. To run the Java1 version of the demos as standalone java programs, change to the "java_demos/java1" directory and set the CLASSPATH environment variable to include the GlgEval.jar and GlgDemo.jar files: ".:./GlgEval.jar:./GlgDemo.jar" on UNIX, or: ".;.\GlgEval.jar;.\GlgDemo.jar" on Windows. To run the Java2 version of the demos, change to the "java_demos/java2" directory and set the CLASSPATH to include the Java2 jar files: ".:./GlgEval2.jar:./GlgDemo2.jar" on UNIX, or: ".;.\GlgEval2.jar;.\GlgDemo2.jar" on Windows. Then start the demo of your choice by using one the following commands: java GlgAircombatDemo (Aircombat simulation) java GlgMapDemo (GIS visualization) java GlgProcessDemo (Process control demo) java GlgRobotArmDemo (3D simulation demo) java GlgAnimationDemo (Simple game animation) java GlgAvionicsDemo (Custom avionics gauges) java GlgGraphDemo (Glg graph samples) java GlgGraphCrossWireDemo (Custom graph with a cross-hair cursor) java GlgGraphLayoutDemo (Graph layout example) java GlgNetworkDemo (Network monitoring demo) To run the Graph Layout Demo, the GlgGraphLayout.jar must also be added to the CLASSPATH. On both Windows and Unix, you can use JRE to run the demos: Java1/AWT: jre -cp .;.\GlgEval.jar;.\GlgDemo.jar (on Windows) jre -cp .:./GlgEval.jar:./GlgDemo.jar (on Unix) Java2/Swing: jre -cp .;.\GlgEval2.jar;.\GlgDemo2.jar (on Windows) jre -cp .:./GlgEval2.jar:./GlgDemo2.jar (on Unix) To recompile the demo source code using the same class path, use the following command: javac .java