|
NetRexx User's Guide, version 2.02
Copyright (c) IBM Corporation, 2001. All rights reserved. ©
| Draft of 22 May 2001 |
[previous | contents | next]
|
After installing NetRexx, it is recommended that you test that it is
working correctly. If there are any problems, check the
Installation Problems section.
To test your installation, make the directory to which you copied the
executables the current directory, then (being very careful to get the
case of letters correct):
-
Enter the command
java COM.ibm.netrexx.process.NetRexxC hello
This should run the NetRexx compiler, which first translates 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 the binary class file hello.class.
The intermediate .java file is then deleted, unless an error
occurred or you asked for it to be kept.[1]
If you get errors from Java and you're running Java 1.2 or later,
first re-check the final two steps in the Installing
for Java 1.2+ section before trying the
Installation Problems section.
-
Enter the command
java hello
This runs (interprets the bytecodes in) the hello.class file,
which should display a simple greeting. On some systems, you may
first have to add the directory that contains the hello.class
file to the CLASSPATH setting so Java can find it.
-
With the sample scripts provided (NetRexxC.cmd, NetRexxC.bat,
or NetRexxC.sh,), or the equivalent in the scripting language of
your choice, the steps above can be combined into a simple single
command such as:
NetRexxC.sh -run hello
This package also includes a trivial nrc.cmd, and
matching nrc.bat and nrc scripts, which simply pass on
their arguments to NetRexxC; nrc is just a shorter name
that saves keystrokes, so for the last example you could type:
nrc -run hello
Note that scripts may be case-sensitive, and unless running the OS/2
Rexx script, you will probably have to spell the name of the program
exactly as it appears in the filename. Also, to use -run, you
may need to omit the .nrx extension.
You could also edit the appropriate nrc.cmd, nrc.bat,
or nrc script and add your favourite default NetRexxC
options there.
For example, you might want to add the -prompt flag (described
later) to save reloading the translator before every compilation.
If you do change a script, keep a backup copy so that if you install
a new version of the NetRexx package you won't overwrite your changes.
Footnotes:
[1] |
For example, by specifying the -keep or -nocompile flags.
|
[previous | contents | next]
|