Quick Links

Contact Information

4800 Liberty Ave
Pittsburgh, PA 15224

Open 9:30am-6pm EST
Monday-Friday

Phone: +1 (412) 682-5282

info@cometway.com
sales@cometway.com
support@cometway.com

For more information about Comet Way products and services, please visit our corporate website at

http://www.cometway.com

Tools for Unix Environments

Comet Way Agent Kernel comes with a set of scripts for building and running agent applications. While these scripts are not necessary in order to make agents work, they are a convenient set of tools that were used in the development process and serve as a useful reference point.

This document has the following sections:

  • ak - Starts and initializes the Comet Way Agent Kernel.
  • ab - Starts the Agent Browser tool using .startup files from the current directory.
  • jc - Compiles .java files, routing the .class files to separate classes directory.
  • build.sh - Calls the compile.sh, demos.sh, finalize.sh, and document.sh scripts in succession in order to build and test this release.
  • compile.sh - Expands the imported JAR files into the classes/ directory, then compiles all of the .java files located underneath the src/ directory.
  • document.sh - Generates HTML documentation for this release using the javadoc tool.
  • finalize.sh - Finalizes a build of this project by removing class files, touching all files with the current date, and generating a dated tar.gz archive of the entire project.

How To Setup the AK Under UNIX

Installation is not difficult to do from your shell account:

  1. Run the ak/install.sh script.
  2. [foo:~/projects/ak] barl% ./install.sh Installing Comet Way Agent Kernel Scripts Creating /home/bar/bin directory Creating /home/bar/classes directory Creating /home/bar/bin/jc Creating /home/bar/bin/ak Creating /home/bar/bin/ab [foo:~/projects/ak] bar% _

    This will create scripts in your ~/bin directory for ak, ab, jc scripts and create the ~/classes directory.

  3. Change to the ak/bin directory and run the ./compile.sh script.
  4. [foo:~/projects/ak/bin] bar% ./compile.sh Creating temporary classes directory Expanding Imported classes... Compiling Comet Way Agent Kernel... Note: Some input files use unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. Creating ak.jar... Removing temporary classes directory [foo:~/projects/ak/bin] bar%

    This compiles the AK project and produces the ak.jar using your native compiler. Having the ak.jar in the class format that your Java VM natively uses will help you avoid any UnsupportedClassVersion exceptions you might get.

    Compiling the AK for yourself is a simple operation and should not be intimidating as long as your JDK tools are already on your path.

  5. Add ~/bin to your path so your ak, ab, and jc scripts can be found.
  6. We typically use tcsh as our shell and set the path to our ~/bin directory in the .cshrc file.

  7. Once your path has been set, create a new terminal and test the ak command. If everything is setup correctly, it will output the AK version to the console along with some other startup messages:
  8. [foo:~/projects/ak] bar% ak [080501-143541 AK] Comet Way Agent Kernel 3.0 Final 04-24-2008 - Patience. [080501-143541 000_AgentKernel] Starting on 2008/05/01 14:35:41.328 EDT [080501-143541 000_AgentKernel] Creating agent com.cometway.xml.XMLStartupAgent [080501-143541 001_XMLStartupAgent] Starting on 2008/05/01 14:35:41.335 EDT [080501-143541 001_XMLStartupAgent] Loading agents from ak.xstartup [080501-143541 001_XMLStartupAgent] Loading agents from . [foo:~/projects/ak] bar% _

  9. Using the jc command, you can compile your .java files and have their class files routed to the ~/classes directory. The directory location of the .java files you compiling is not important as long as you are using the jc command to compile them. Because the ~/classes directory is automatically added to the AK classpath when compiling or running the AK, you will no longer need to be constantly bothered about classpath issues.
  10. We typically use it like this:

    [foo:~/projects/myagents] bar% jc *.java Compiling... HelloWorldAgent.java [foo:~/projects/myagents] bar% _

[Next]

Description: Description of AK Unix Tools.

Updated: Mon May 19 06:26:29 EDT 2008