Setting up your Java environment consists of these steps:
Java virtual machines are included in Java Development Kits (JDKs) that are downloadable from the Worldwide Web as well as distributed with various Java development tools and textbooks. You can obtain JDK's built by Sun at http://java.sun.com/j2se/ and by IBM at http://www.ibm.com/java/jdk/download/index.html. Follow the installation instructions provided at those sites.
Java development tools such as the Gnu Java Development Environment, IBM's VisualAge for Java, Inprise JBuilder, Symantec VisualCafe, and SilverStream provide edit and debug capabilities that improve programmer productivity. Configuring these tools is best left to their own setup instructions. To see a list of JAR files that contain the classes provided by Able, look in the product bin directory (for example, C:\able1_1a\bin)or browse a script such as C:\able1_1a\bin\runnit.bat. Jars shipped with Able version 1.1a are here.
The Java development tools we use are:
Here are the steps needed to configure a project in VisualCafe Version 3.0, assuming a root working directory of C:\ableWorkDir\able,and a package of com.ibm.able.examples.ablebean:
There are three environment variables used to define the Able and Java environment. The scripts provided with Able such as runnit.bat calculate and set these variables from the starting directory. The Windows .bat scripts work only on English machines as is.
If you are not using a script provided with Able or you have a non-English Windows system, you will need to define and set the following environment variables either in your command window or in your Java development tool. Java development tools may have their own procedure for setting these values rather than relying on system environment variables.
PATH is the environment variable that contains the path used to find the executable file for the Java virtual machine.
ABLE_HOME is the product directory and is used to calculate the Able.ProductDirectory property. Set this environment variable to the path where you installed Able, such as C:\able1_1a.
CLASSPATH provides the path to classes for loaded by the Java Virtual Machine. Scripts provided with Able prepend any existing CLASSPATH settings with the appropriate jar files and directory paths. If you are developing your own beans and agents, browse the appropriate script to see which jar files and directories to include in your own CLASSPATH. Able jar files are located in the product directory's lib subdirectory. Jar files required by Able 1.1a are:
%ABLE_HOME%\lib\ableall.jar;%ABLE_HOME%\lib\antlr.jar;%ABLE_HOME%\lib\archiveaccessor.jar;%ABLE_HOME%\lib\jcchart361J.jar;%ABLE_HOME%\lib\JLog.jar;%ABLE_HOME%\lib\xerces.jar; |
Depending on the version of the Java Virtual Machine you use, you may need to include some Java files as well; for example, Java 1.1 users will need to include both classes.zip and swingall.jar. The following examples show appropriate values for various Java Virtual Machine versions; note that beginning with Able version1.1a, JDK 1.2.2 or later is required:
Environment variable | JDK 1.3 or 1.2 | |
PATH | c:\jdk1.3.sun\bin;c:\winnt\system32;c:\winnt | |
ABLE_HOME (if set) | C:\able1_1a | |
CLASSPATH | not defined | |
CLASSPATH with Able 1.1ajars | %ABLE_HOME%\lib\ableall.jar;%ABLE_HOME%\lib\antlr.jar;%ABLE_HOME%\lib\archiveaccessor.jar;%ABLE_HOME%\lib\jcchart361J.jar;%ABLE_HOME%\lib\JLog.jar;%ABLE_HOME%\lib\xerces.jar; |
The core developers of Able use a variety of platforms for code and debug, and can provide limited assistance on basic Java knowledge and in development environments. Our preferred communication mechanism is the Able discussion forum on IBM Alphaworks at http://www.alphaworks.ibm.com/tech/able. You may also e-mail us at ableinfo@us.ibm.com.
The operating systems with which we are familiar include:
Linux and Windows 2000 will be included in the near future.
Should you need individual assistance with your Java environment, please provide the following information:
To see what version of Java you are using, type the following at a command prompt:
java -version
The Java virtual machines used at the time this document was written include:
Example environment settings are as follows in a Windows environment:
C:\able1_1a\bin>set CLASSPATH Environment variable CLASSPATH not defined C:\able1_1a\bin>set PATH Path=c:\jdk1.3.sun\bin;c:\winnt\system32;c:\winnt PATHEXT=.COM;.EXE;.BAT;.CMD C:\able1_1a\bin>set ABLE_HOME ABLE_HOME=C:\able1_1a C:\able1_1a\bin>java -version java version "1.3.0" Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0-C) Java HotSpot(TM) Client VM (build 1.3.0-C, mixed mode) C:\able1_1a\bin>runnit C:\able1_1a\bin>java -classpath ".;C:\able1_1a\lib\ableall.jar;C:\able1_1a\lib\antlr.jar; C:\able1_1a\lib\archiveaccessor.jar;C:\able1_1a\lib\JLog.jar; C:\able1_1a\lib\jcchart361J.jar;C:\able1_1a\lib\xerces.jar" -Dable.home="C:\able1_1a" -Dable.prefdir="C:\able1_1a" com.ibm.able.editor.AbleEditor Licensed Materials - Property of IBM Package: com.ibm.able (C) Copyright IBM Corporation 1999, 2000. All Rights Reserved. US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp. Loading core ABLE beans from C:\able1_1a\lib\ablebeans.jar adding AbleRuleSet adding AbleNeuralPredictionAgent adding AbleGeneticSearchAgent adding AbleExport adding AbleImport adding AbleBackPropagation adding AbleSelfOrganizingMap adding AbleFilter adding AbleNeuralClassifierAgent adding AbleDefaultAgent adding AbleNeuralClusteringAgent Loading example ABLE beans from C:\able1_1a\lib\ableexamples.jar adding SimpleAbleBean adding SampleSensorEffector adding SimpleAbleAgent C:\able1_1a\bin>