Problems?
If the 'hello' example doesn't work, one of the following problems
may be the cause:
-
A "Can't find class COM.ibm.netrexx.process.NetRexxC..." message
probably means that the NetRexxC.zip file has not been specified in
your CLASSPATH setting, or is misspelled, or is in the wrong case.
The CLASSPATH is the setting that Java uses to find classes for
execution; please refer to your Java installation instructions for
information on setting the CLASSPATH.
-
A "Can't find class hello..." message may mean that the directory
with the hello.class file is not in your CLASSPATH (you may need to
add a '.;' to the CLASSPATH, signifying the current directory), or
either the filename or name of the class (in the source) is spelled
wrong (the java command is [very] case-sensitive).
-
The compiler appears to work, but towards the end fails with
"Exception ... NoClassDefFoundError: sun/tools/javac/Main".
This indicates that you are running Java 1.2 but did not add the
Java tools to your classpath (hence Java could not find the javac
compiler). See installation instructions above for more details.
-
You have an extra blank or two in the CLASSPATH. Blanks should only
occur in the middle of directory names (and even then, you probably
need some double quotes around the SET command or the classpath
segment with the blank). The JVM is sensitive about this.
-
You didn't install on a file system that supports long file
names (for example, on OS/2 or Windows you should use an HPFS disk
or equivalent). Like most Java applications, NetRexx uses long file
names.
-
You have a down-level Unzip or Tar program. Check that the
file 'NetRexxC.zip', with just three capital letters, exists in the
subdirectory 'lib' below the Java home directory.
-
You have only the Java runtime installed, and not the toolkit. If
the toolkit is installed, you should have a program called javac
on your computer. (Try running that from a commandline prompt.)
-
An 'Out of environment space' message when trying to set CLASSPATH
under Win95-DOS can be remedied by adding /e:4000 to the 'Cmd line'
entry for the MS-DOS prompt properties (try 'command /?' for more
information).
-
An exception, apparently in the Rexx translate method, when
compiling with Microsoft Java SDK 3.1 (and possibly later SDKs) is
caused by a bug in the just-in-time compiler (JIT) in that SDK.
Turn off the JIT using Start -> Settings -> Control Panel ->
Internet to get to the Internet Properties dialog, then select
Advanced, scroll to the Java VM section, and uncheck 'Java JIT
compiler enabled'. Alternatively, turn of the JIT by setting the
environment variable:
SET MSJAVA_ENABLE_JIT=0
(this can be placed in a batch file which invokes NetRexxC, if
desired).
-
An 'Exception 0005' when using the OS/2 beta Java 1.1.1 toolkit is
probably caused by the just-in-time compiler. Try turning it off
before running NetRexxC by setting the environment variable:
SET JAVA_COMPILER=no
(and ignore the 'unable to load dll' message).
-
An ArrayIndexOutOfBoundsException when compiling hello.nrx under AIX
is caused by an early faulty JIT. Either disable the JIT (as for
OS/2) or update your AIX Java SDK.
-
A java.lang.OutOfMemoryError when running the compiler probably
means that the maximum heap size is not sufficient. The initial
size depends on your Java virtual machine; you can change it to
(say) 24 MegaBytes by setting the environment variable:
SET NETREXX_JAVA=-mx24M
In Java 1.2.2 or later, use:
SET NETREXX_JAVA=-Xmx24M
The NetRexxC.cmd and .bat files add the value of this environment
variable to the options passed to java.exe.
-
You have a down-level version of Java installed. NetRexxC 1.1xx
will run only on Java version 1.1.0 (and later versions). You can
check the version of Java you have installed using the command 'java
-version'. An older version of the NetRexx package is available for
Java 1.0, however that version will no longer be enhanced or
supported in any way.
-
Your Java toolkit installation has .class files from an earlier
installation of NetRexx in classes/java/lang, classes/netrexx/lang,
or other subdirectories in the 'classes' directory below the Java
home directory.
A message that reports ambiguous class references is a likely sign
of this problem. The easiest way to solve it is to re-install the
Java toolkit in a clean subdirectory.
-
If, when reporting an error or warning, the compiler gives a rather
cryptic identifier and reports 'Sorry, full message not available',
this means that it could not find the NetRexxC.properties (error
messages) file, which should be in the COM.ibm.netrexx.process
package (in NetRexxC.zip).
[ previous section | contents | next section ]
From 'nrinst.doc', version 1.160.
Copyright(c) IBM Corporation, 1996, 2000. All rights reserved. ©