[tcljava-user] Running JACL on Windows XP from Windows command line.
Brought to you by:
mdejong
From: Patrick F. <pfi...@oz...> - 2005-07-10 09:20:44
|
I have set up a jacl installation on Windows XP to run from the windows command line. Mysys is not needed at runtime but it's still needed for the compile stage(generation of jacl.jar and tcljava.jar). I just converted the jaclsh script from bash to dos. See below. I installed following the instructions at this link "http://wiki.tcl.tk/9993" but set up my directory structure a little differently. I created "D:\JACL" then copied the Sun 1.3.1 JDK directory into "D:\JACL\jdk1.3.1_01". I set the install directory options to "d:\jacl" and the jdk location to "D:\JACL\jdk1.3.1_01" at the mysys make/install stage and finally I copied the demo directory from the jacl download directory to "D:\JACL\demos". The final install directory structure looks like: D:\JACL\bin D:\JACL\demos D:\JACL\jdk1.3.1_01 D:\JACL\lib The advantage of this approach is that it packages the 1.3.1 JDK with JACL so that it's possible to zip up the directory structure and port the installation from machine to machine(Windows) with no need to re-compile. JACLSH.cmd starts the jacl shell. Just make sure the bat file directory locations are correct i.e. "c:" or "d:". Running the shell ************* E:\home\pfinnegan>cd /d d:\jacl\bin D:\JACL\bin> D:\JACL\bin>jaclsh.cmd % pwd D:/JACL/bin % cd ../demos % pwd D:/JACL/demos %% glob * gluepkg gridDemo packDemo pyramidpkg README simplepkg VolcanoRobot watchpkg % cd gridDemo % pwd D:/JACL/demos/gridDemo % glob * grid.tcl gridDemo.tcl README % source gridDemo.tcl ................................ brings up the "Downsize Assistant" java gui. JACLSH.cmd - windows bat file to start JACL shell. ------------------------------------------------------------------------------------- @echo off :: Wrapper script to start up Jacl set prefix=d:\jacl :: Tcl/Java version number set TCLJAVA_VERSION=1.3.1 :: Directory where platform independent files live. This :: includes the .jar files and any .tcl files set XP_TCLJAVA_INSTALL_DIR=%prefix%\lib\tcljava%TCLJAVA_VERSION% set JACL_CLASSPATH=d:\JACL\jdk1.3.1_01\lib\tools.jar;d:\JACL\jdk1.3.1_01\lib\dt.jar;d:\JACL\jdk1.3.1_01\jre\lib\rt.jar;%XP_TCLJAVA_INSTALL_DIR%\tcljava.jar;%XP_TCLJAVA_INSTALL_DIR%\jacl.jar :: Fully qualified path name of JVM executable set JAVA=d:\JACL\jdk1.3.1_01\bin\java :: The arguments to the JAVA command set JAVA_FLAGS="-native -ms5m -mx22m" :: Run java with the args passed in from the calling environment :: We must set the CLASSPATH env var instead of using the -classpath :: argument because jacl might want to exec a program that also :: depends on the CLASSPATH setting and Java can not export env vars set CLASSPATH=%JACL_CLASSPATH%;%CLASSPATH% echo "CLASSPATH is .........." echo %CLASSPATH% echo " " echo "PATH is ............." echo %PATH% echo " " echo %JAVA% %JAVA_FLAGS% tcl.lang.Shell echo " " %JAVA% %JAVA_FLAGS% tcl.lang.Shell |