NetRexx User's Guide, version 2.02
Copyright (c) IBM Corporation, 2001. All rights reserved. ©
|Draft of 22 May 2001
|[previous | contents | next]
(Many thanks to Bill Potvin and Bernhard Hurzeler for the details in
Here's how to install NetRexx for use with Visual J++:
Copy the following file into the [java_root]\Lib directory:
For example, if [java_root] is at E:\Java:
C:\>copy NetRexxC.jar E:\Java\Lib
Similarly, copy the nrc.bat and NetRexxC.bat files to the
Add the jar file explicitly to the CLASSPATH:
For example, if [java_root] is E:\Java, your CLASSPATH
might then look like this:
Under Windows NT 4.0 and Windows 2000 this can be done using Start,
Settings, Control Panel, System, Environment tab, System Variables, and
clicking on CLASSPATH.
Using NetRexx with Visual J++
Using NetRexx with J++ is very similar to using it with other Java
development kits; the main difference is in the command names:
Use the J++ jview command to invoke the NetRexx translator to
convert a NetRexx program (e.g., hello.nrx) into a Java program
Note that some versions of the jview package do not provide
a classes.zip file by default, but the NetRexx compiler needs
this to determine information about classes that you use. If this is
the case, you will get a class not found error
for java.lang.Object. In this case, run the command
from an MS-DOS prompt to create the classes.zip file.
When running the NetRexx compiler, you must specify
the -nocompile option to NetRexx in order to prevent it from
trying to invoke the Java toolkit compiler javac (which isn't in
the MicroSoft J++ classes).
For example, if hello.nrx is in the current directory:
jview COM.ibm.netrexx.process.NetRexxC hello -nocompile
The result of this step should be a Java source file
Use the J++ jvc command to compile the Java source file:
The result of this step should be a Java class file
Execute the class file with the J++ command jview:
Note that some earlier versions of jview fail with an exception
(an ArrayIndexOutOfBoundsException in RexxUtil.translate) when
compiling hello.nrx. This is due to a bug in the jview JIT;
the workaround is to turn the JIT off.
Note that all the commands above probably have to be typed exactly as
shown (Java is very case-sensitive). The supplied NetRexxC.bat
can be modified to work with the above commands by using jview
instead of the java command and adding the jvc step.
||Just In Time compiler.
[previous | contents | next]