Here's how to install the NetRexx compiler and runtime classes:
This should add the NetRexx runtime and compiler classes subdirectories ('classes/netrexx/lang' or 'classes\netrexx\lang', and 'classes/netrexx/process' or 'classes\netrexx\process') to your Java directory tree. Also, a 'helper' class will have been added to classes/sun/tools/debug (RxPublicAgent.class).
In addition, some sample scripts and a test program should have been added to the Java 'bin' directory:
hello.nrx -- a simple NetRexx program for testing NetRexxC.cmd -- the NetRexx compiler command nrc.cmd -- shorter name for NetRexxC
The last two are simple Rexx scripts for making it easier to use the compiler. You don't have to use these, but they save some typing. They should require little or no modification to run under the Rexx interpreter for your platform; for details of Rexx interpreters, see: http://www2.hursley.ibm.com/rexx/
The NetRexx class files can then be referred to from Java or NetRexx programs as from package 'netrexx.lang'. For example, a string might be of class 'netrexx.lang.Rexx'.
To check installation, change directory to the Java BIN directory, then:
java netrexx.process.NetRexxC hello
This should run the NetRexx compiler, which converts the NetRexx program 'hello.nrx' to the Java program 'hello.java'. It then invokes the default Java compiler (javac), to compile the file 'hello.java' to make 'hello.class'. The intermediate .java file is then deleted, unless an error occurred.
java hello
This runs (interprets bytecodes from) the 'hello.class' file, which should display a simple greeting.
With the sample scripts provided (NetRexxC.cmd), or the equivalent in the scripting language of your choice, the steps above can be combined into a simple single command:
netrexxc -run hello
This package also includes a trivial 'nrc.cmd' file that simply passes on its arguments to NetRexxC; 'nrc' is just a shorter name that saves typing, so for the last example you could type:
nrc -run hello
You could also edit the nrc.cmd and add your favourite 'default' NetRexxC options there (if you do this, keep a backup copy, so that if you install a new version of the NetRexx package you won't overwrite your changes).
[ previous section | contents | next section ]
From 'nrinst.doc', version 0.75.
Copyright(c) IBM Corporation, 1996. All rights reserved. ©