Installation Notes

"CREATE ONCE, GO ANYWHERE"

Mozart - Mobile Agents ]


The Aglets Software Development Kit Download ASDK provides everything you need to run Aglet Mobile Agents on your Java virtual machine. The installation instructions are fairly straight forward with a few exceptions as noted below.  Check out the Getting Started page at IBM: http://aglets.trl.ibm.co.jp/getstarted.html

  • You need to have TCP/IP running on the machine, as we have in the past.
  • We used version ASDK version 1.0.3. This version is not compatible with JKD 1.2. We ran it with JDK1.1.7b.
  • The ASDK is a self extracting file. Once extracted most of the documentation is available in the doc directory.
  • Print and read the FAQ and Installation Guide before proceeding.
  • The environment variables referred to in the installation guide need to be set in the agletsd.bat file in the bin directory.

Once you install the ASDK start Tahiti (c:\aglets1.0.3\bin> agletsd) server. Tahiti is the context environment required to run aglets. Run one of the example aglets provided in the ASDK. You can run multiple instantiations of Tahiti by using different ports. Again this is clearly explained in the documentation so it will not be repeated here.

Compiling and running your own aglets is explained in the mkaglet.html file in the doc directory. Also see the FAQ question section "Questions about aglet programming:". As explained in mkaglet.hml it is necessary to set the CLASSPATH and use the -d and -classpath java compile options. They give a good example. I found it easier to copy the example into a batch file (agletc.bat) instead of retyping the long commands each time.

example agletsd.bat file.
example agletc.bat file.

 


agletsd.bat

@echo off
@REM ==================================================
@REM agletsd.bat for ASDK 1.0.3 on Win32
@REM Authors Danny B. Lange
@REM Mitsuru Oshima
@REM ONO Kouichi
@REM Hideaki Tai
@REM Date June 19, 1998
@REM ==================================================
@IF "%OS%"=="Windows_NT" setlocal
@set DEF_PORT=434
@REM Configurable part (AGLET_EXPORT_PATH and AGLET_PATH are optional)
@REM The 4 lines below are environment settings you need to change per system
set AGLET_HOME=D:\stuff\john\downloads\aglets\Aglets1.0.3
set JDK_HOME=C:\jdk1.1.7b
set PATH=%AGLET_HOME%\bin;%PATH%
set HOME=d:\aglets

@REM set AGLET_EXPORT_PATH=(';' separated pathlist for "aglets.export.path")
@REM set AGLET_PATH=(';' separated pathlist for "aglets.class.path")
@set JAVA_HOME=
@IF "%AGLET_HOME%"=="" goto ERROR1
@IF NOT EXIST %AGLET_HOME%\lib\aglets.jar goto ERROR2
@IF NOT "%HOME%"=="" goto SKIP1
@ECHO "Warning: HOME is not set. I'll use AGLET_HOME instead."
HOME=%AGLET_HOME%
:SKIP1
@IF "%AGLET_EXPORT_PATH%"=="" set AGLET_EXPORT_PATH=%AGLET_HOME%\public
@IF NOT "%JDK_HOME%"=="" set ASDK_CP=%AGLET_HOME%\lib\aglets.jar;%JDK_HOME%\lib\classes.zip;%CLASSPATH%
@IF "%JDK_HOME%"=="" set ASDK_CP=%AGLET_HOME%\lib\aglets.jar;%CLASSPATH%
@IF NOT "%JDK_HOME%"=="" set JAVA_HOME=
@IF NOT "%JDK_HOME%"=="" set ASDK_JAVA_CMD=%JDK_HOME%\bin\java.exe
@IF "%JDK_HOME%"=="" set ASDK_JAVA_CMD=java.exe
@IF NOT "%ASDK_JAVA%"=="" set ASDK_JAVA_CMD=%ASDK_JAVA%
@IF NOT "%LANG%"=="" set ASDK_LANG=%LANG%
@IF "%LANG%"=="" set ASDK_LANG=en
@IF NOT "%1"=="-verbose" goto LOOP
@echo Your Configurations are...
@echo HOME=%HOME%
@echo LANG=%ASDK_LANG%
@echo JDK_HOME=%JDK_HOME%
@echo CLASSPATH=%ASDK_CP%
@echo AGLET_HOME=%AGLET_HOME%
@echo AGLET_PATH=%AGLET_PATH%
@echo AGLET_EXPORT_PATH=%AGLET_EXPORT_PATH%
:LOOP
%ASDK_JAVA_CMD% -classpath %ASDK_CP% -Dprogram-name=agletsd -Duser.home=%HOME% -Duser.language=%ASDK_LANG% -Daglets.home=%AGLET_HOME% -Daglets.class.path=%AGLET_HOME%\public;%AGLET_PATH% -Daglets.export.path=%AGLET_HOME%\public;%AGLET_EXPORT_PATH% com.ibm.aglets.tahiti.Main -defaultport %DEF_PORT% %1 %2 %3 %4 %5 %6 %7 %8 %9
if ERRORLEVEL 1 GOTO EXIT
GOTO LOOP
@REM =====
@REM ERROR
@REM =====
:ERROR2
echo Your AGLET_HOME[=%AGLET_HOME%] is wrong!
GOTO EXIT
:ERROR1
echo Please set AGLET_HOME environment variable!
GOTO EXIT
:EXIT
@IF "%OS%" == "Windows_NT" endlocal


agletc.bat
 
set CLASSPATH=c:\jdk1.1.7b\lib\classes.zip;c:\Aglets1.0.3\lib\aglets.jar
javac -d c:\Aglets1.0.3\public -classpath %CLASSPATH%;c:\Aglets1.0.3\public   YOURAGLET.java
Back to Top

For problems or questions regarding this web contact [jalwan@shrike.depaul.edu].
Last updated: March 17, 1999.