home *** CD-ROM | disk | FTP | other *** search
/ PC Online 1997 May / PCO_5_97.ISO / FilesBBS / OS2 / NETREXX.ARJ / NETREXX.ZIP / NetRexx / nrinst.doc < prev    next >
Encoding:
Text File  |  1997-01-03  |  27.5 KB  |  682 lines

  1.                                                             NetRexx 1.00
  2. NetRexx Installation and User's Guide
  3. =====================================
  4.  
  5. Copyright(c) IBM Corporation, 1996, 1997.  All rights reserved.
  6.  
  7.  
  8. Introduction
  9. """"""""""""
  10. This document is the "User's Guide" for the reference implementation of
  11. NetRexx.
  12.  
  13. NetRexx is a new programming language; a blend of Rexx and Java; the
  14. rules of syntax closely follow those of Rexx, while the semantics often
  15. follow Java.  It is a dialect of Rexx that is as efficient and portable
  16. as Java, while preserving the philosophy and ease of use of Rexx.
  17.  
  18. This document covers:
  19.  
  20.   o Unpacking the NetRexx packages
  21.  
  22.   o Installing the NetRexx package -- documentation and samples
  23.  
  24.   o Installing the NetRexx executables (for any Java platform):
  25.  
  26.       o How to install the NetRexx compiler
  27.  
  28.       o Problem solving
  29.  
  30.       o How to install just the NetRexx runtime classes
  31.  
  32.   o Using the NetRexxC compiler
  33.  
  34.   o Using NetRexx classes with World Wide Web applets
  35.  
  36.   o Installing and using the NetRexx print package
  37.  
  38.   o Current restrictions, _etc._
  39.  
  40. The NetRexx documentation and software are distributed free of charge
  41. under the conditions of the IBM Employee Written Software program.
  42. If you download or use a NetRexx package you agree to the terms in the
  43. _IBM License Agreement_ included in the package as the file license.txt.
  44.  
  45. For details of the NetRexx language, and the latest news, please see the
  46. NetRexx documentation included with this package or available on the
  47. World Wide Web, for example at: http://www2.hursley.ibm.com/netrexx/
  48.  
  49. Mike Cowlishaw
  50. IBM UK Laboratories
  51.  
  52.  
  53. Unpacking NetRexx packages
  54. """"""""""""""""""""""""""
  55. The NetRexx packages are shipped in two forms, identified by a suffix
  56. following the name:
  57.  
  58.   o .zip format -- commonly used on OS/2 and other operating systems for
  59.     the IBM PC
  60.  
  61.   o .tar.Z format -- (tape archive plus compress) commonly used on AIX
  62.     and other Unix systems.
  63.  
  64. You probably know how to handle these, but a word of caution: the
  65. packages contain directory structures, and files with 'long names'
  66. (that is, not of 8.3 maximum length names) which are case-sensitive.
  67. Many utilities, including some versions of UNZIP and TAR, can lose
  68. case information, truncate names, or fail to restore directories.
  69.  
  70. --- Unpacking .zip files ---
  71.  
  72. The most common packages for 'unzipping' these are Info-ZIP and PKZIP:
  73. Here are some tips:
  74.  
  75.   o Ensure that you are unzipping to a disk that supports long file
  76.     names (for example, an HPFS disk or equivalent on OS/2 or Windows).
  77.  
  78.   o Info-ZIP: use version 5.12 (August 1994) or later.  The syntax for
  79.     unzipping NetRexx.zip is simply
  80.  
  81.       unzip NetRexx
  82.  
  83.     which should create the files and directory structure directly.
  84.     Please see later in this document for complete installation
  85.     instructions.
  86.  
  87.   o PKZIP: use a version that supports long file names.  The syntax for
  88.     unzipping NetRexx.zip is
  89.  
  90.       pkunzip -d NetRexx
  91.  
  92.     which should create the files and directory structure directly.  The
  93.     '-d' flag indicates that directory structure should be preserved.
  94.  
  95. --- Unpacking .tar.Z files ---
  96.  
  97. You need an up-to-date version of two programs: 'tar' and 'uncompress';
  98. these are available for most operating systems.  Here are some tips:
  99.  
  100.   o Ensure that you are unpacking to a disk that supports long file
  101.     names (for example, any Unix disk, or an HPFS disk or equivalent on
  102.     OS/2 or Windows).
  103.  
  104.   o Ensure that the version of tar that you use preserves case in names.
  105.     If all the files created by tar have all-lowercase names, you need a
  106.     new version of tar.
  107.  
  108. The process of unpacking the file takes two steps:
  109.  
  110.   1. Uncompress the file, using uncompress (this may be called
  111.      simply 'compress' on some systems).  The syntax for uncompressing
  112.      NetRexx.tar.Z is probably one of:
  113.  
  114.        uncompress  NetRexx.tar.Z
  115.        compress -d NetRexx.tar.Z
  116.  
  117.      (the '-d' means decompress, and may be optional).  This should
  118.      replace the file with one called NetRexx.tar
  119.  
  120.   2. Unpack the files and directories from the .tar file.  The syntax
  121.      for this is
  122.  
  123.        tar -xvf NetRexx.tar
  124.  
  125.      This should create the files and directories from the package,
  126.      displaying the name of each as it is unpacked.  You may see error
  127.      messages where directories already exist; these can be ignored.
  128.  
  129. After unpacking the files, the .tar file can be erased.
  130.  
  131.  
  132. Installation procedure - online documentation and samples
  133. """""""""""""""""""""""""""""""""""""""""""""""""""""""""
  134. The NetRexx package (NetRexx.zip, or NetRexx.tar.Z) contains the NetRexx
  135. online documentation, together with samples and examples, and the
  136. packages of executables.
  137.  
  138.   1. Copy the package file to the root directory of your choice,
  139.      preserving the original name.
  140.  
  141.   2. With your chosen directory as your current directory, unpack the
  142.      package, following the instructions in 'Unpacking NetRexx packages'
  143.      above.
  144.  
  145.      This should add the directory 'NetRexx' to your chosen directory,
  146.      containing the documentation and samples for NetRexx, along with
  147.      the packages of executables.  There should also be a subdirectory
  148.      ('NetRexx/netrexx/lang' or 'NetRexx\netrexx\lang') containing runtime
  149.      class files used by some of the samples.
  150.  
  151. The online documentation comes in two forms: plain ASCII (files with
  152. extension '.doc'), and World Wide Web hypertext format (files with
  153. extension '.htm' or '.html', '.gif', etc.).  To view the hypertext
  154. version, start your browser at the file "netrexx.htm".  For example, if
  155. you are using the IBM Web Explorer then the command
  156.  
  157.   explore netrexx.htm
  158.  
  159. (executed when the documentation directory is the current directory)
  160. should show the NetRexx front page.
  161.  
  162. Included in the documentation collection are a number of examples and
  163. samples (Hello, HelloApplet, etc.).  To run any of these, you must have
  164. the Java runtime environment installed.
  165.  
  166. Some of the examples must be viewed using the Java toolkit applet-viewer
  167. or a Java-enabled browser.  Please see the hypertext pages describing
  168. these for detailed instructions.  In general, if you see a message from
  169. Java saying:
  170.  
  171.   void main(String argv[]) is not defined
  172.  
  173. this means that the class cannot be run using just the 'java' command.
  174.  
  175.  
  176. Installation of NetRexx Executables
  177. """""""""""""""""""""""""""""""""""
  178. [Note: if you installed NetRexx 0.88 (or an earlier version of NetRexx)
  179. please remove or rename the 'netrexx' directory under the Java 'classes'
  180. directory -- or wherever you put the NetRexx classes -- before
  181. installing later versions of NetRexx.]
  182.  
  183. The NetRexx package includes two packages of software (each will have
  184. the same suffix as the package you unpacked it from, that is, '.zip' or
  185. '.tar.Z'):
  186.  
  187.   1. nrtools -- the files for the NetRexx compiler, of which the most
  188.      important is NetRexxC.zip, which contains the Java .class files
  189.      that implement the compiler.  The NetRexx compiler is in fact a
  190.      translator; it translates NetRexx programs to Java source code,
  191.      which is then compiled using the javac compiler (or you can use the
  192.      Java compiler of your choice, if you prefer).  This package
  193.      requires that the Java toolkit (1.x) be installed.
  194.  
  195.      nrtools also includes a separate copy of the NetRexx runtime
  196.      classes, in NetRexxR.zip
  197.  
  198.   2. nrping -- the Pinger sample application.  Please see Pinger.htm for
  199.      information about this.
  200.  
  201. To install and use either of these packages, you must have already
  202. installed the Java Development Kit (JDK) runtime (and toolkit, if you
  203. want to compile NetRexx programs).  For more information on these:
  204.  
  205.   o For OS/2 and AIX and other IBM operating systems, see the _IBM
  206.     Centre for Java Technology_ page at:
  207.  
  208.     http://ncc.hursley.ibm.com/javainfo/hurindex.html
  209.  
  210.   o For other operating systems, see the _Sun Microsystems Java_ page
  211.     at http://www.javasoft.com, or other suppliers of Java toolkits.
  212.  
  213.  
  214. Installation of the NetRexx compiler
  215. ''''''''''''''''''''''''''''''''''''
  216. Here's how to install the NetRexx compiler and runtime classes:
  217.  
  218.   1. Copy the 'nrtools.zip' or 'nrtools.tar.Z' file from the NetRexx
  219.      documentation directory to the Java home directory, using the
  220.      original name.  The name of the Java home directory will vary
  221.      depending on the operating system you are using.  Some
  222.      possibilities are:
  223.  
  224.         /java
  225.         /jdk1.1/java
  226.         \javaos2
  227.         \jdk1.1\java
  228.  
  229.      It will contain directories such as 'bin' and 'lib'.
  230.  
  231.      [Note: if your Java home directory is on a CD-ROM, or otherwise
  232.      inaccessible, you'll need to choose a different directory and set
  233.      up a CLASSPATH environment variable that points to it.  Consult
  234.      your Java toolkit documentation for details on how to do this.
  235.      You'll also need to set the NetRexx home directory -- see below.]
  236.  
  237.   2. With the Java home directory as your current directory, unpack the
  238.      package, following the instructions in "Unpacking NetRexx packages"
  239.      above.
  240.  
  241.      This should add the .zip files for the NetRexx runtime and compiler
  242.      classes (NetRexxR.zip and NetRexxC.zip) and the compiler's error
  243.      message file (NetRexxC.properties) to the Java 'lib' directory.
  244.  
  245.      In addition, some sample scripts and a test program should have
  246.      been added to the Java 'bin' directory:
  247.  
  248.        hello.nrx    -- a simple NetRexx program for testing
  249.        NetRexxC.cmd -- the NetRexx compiler command in Rexx
  250.        NetRexxC.bat -- similar NetRexx compiler command (Windows .bat)
  251.        nrc.cmd      -- shorter name for NetRexxC.cmd
  252.        nrc.bat      -- shorter name for NetRexxC.bat
  253.  
  254.      The .cmd files are simple Rexx scripts for making it easier to use
  255.      the compiler.  You don't have to use these, but they save some
  256.      typing.  They should require little modification to run under
  257.      the Rexx interpreter for your platform; for details of Rexx
  258.      interpreters, see: http://www2.hursley.ibm.com/rexx/
  259.  
  260.      Under Windows, the .bat files should work -- they are not as
  261.      flexible as the .cmd files, but will save typing.
  262.  
  263.   3. Check that the names are correct in the 'lib' directory: there
  264.      should be a file in the directory called 'NetRexxC.properties';
  265.      if the name is all in lowercase, or the word 'properties' is
  266.      truncated, the package has not been unpacked correctly
  267.      (see "Unpacking NetRexx packages").
  268.  
  269.   4. For Java to be able to find the NetRexx classes, you must update
  270.      the CLASSPATH environment variable by adding the full path and name
  271.      of the NetRexxC.zip file to the CLASSPATH setting.  There will
  272.      often already be a CLASSPATH variable set, including a path to the
  273.      standard Java classes.zip file.  Specify or add the full path
  274.      (disk, directories, and file specification) for NetRexxC.zip,
  275.      making sure that the case of every letter is exactly right (Java is
  276.      very case-sensitive). For example, the full path might be something
  277.      like:
  278.  
  279.        e:\java1.1\java\lib\NetRexxC.zip
  280.  
  281.      The procedure for setting the CLASSPATH variable depends on your
  282.      operating system (and there may be more than one way).  Here are
  283.      some examples:
  284.  
  285.        o In OS/2 or Windows, use a SET CLASSPATH= command in CONFIG.SYS
  286.          (for OS/2) or in AUTOEXEC.BAT (for Windows) and re-boot after
  287.          changing.  In both cases the command syntax is the same, and
  288.          might look like this:
  289.  
  290.            set classpath=.;f:\javaos2\lib\NetRexxC.zip
  291.  
  292.          In this example, the first segment of the value (before the
  293.          semicolon) lets classes in the current directory be found, and
  294.          the second segment includes the classes needed by NetRexx.
  295.          Both environments normally include the standard Java classes
  296.          automatically.
  297.  
  298.        o For Unix (Korn shell or Bourne shell), use:
  299.  
  300.            CLASSPATH=<newdir>:$CLASSPATH
  301.            export CLASSPATH
  302.  
  303.          and changes for re-boot or opening of a new window should be
  304.          placed in your .login (Bourne) or .profile (Korn) file
  305.  
  306.        o For Unix (C shell), use:
  307.  
  308.            setenv CLASSPATH <newdir>:$CLASSPATH
  309.  
  310.          and changes for re-boot or opening of a new window should be
  311.          placed in your .cshrc file
  312.  
  313.      If you are unsure of how to do this, check the documentation you
  314.      have for installing the Java toolkit.
  315.  
  316. Note: If you add NetRexxC.zip to the CLASSPATH value then you do not
  317. need to add NetRexxR.zip; the latter contains only the NetRexx runtime
  318. classes (which are provided separately for people who don't want to run
  319. the NetRexx compiler).  These runtime classes are also included in
  320. NetRexxC.zip.  Whichever zip is used, the NetRexx runtime classes can be
  321. referred to from Java or NetRexx as being in the 'netrexx.lang' package.
  322. For example, a string might be of class 'netrexx.lang.Rexx'.
  323.  
  324. --- Checking your installation is correct ---
  325.  
  326. To check installation, change directory to the Java 'bin' directory,
  327. then (being very careful to get the case of letters correct):
  328.  
  329.   o  Enter the command
  330.  
  331.        java COM.ibm.netrexx.process.NetRexxC hello
  332.  
  333.      This should run the NetRexx compiler, which converts the NetRexx
  334.      program 'hello.nrx' to the Java program 'hello.java'.  It then
  335.      invokes the default Java compiler (javac), to compile the file
  336.      'hello.java' to make 'hello.class'.  The intermediate .java file
  337.      is then deleted, unless an error occurred.
  338.  
  339.   o  Enter the command
  340.  
  341.        java hello
  342.  
  343.      This runs (interprets bytecodes from) the 'hello.class' file,
  344.      which should display a simple greeting.  On some systems, you may
  345.      first have to add the directory that contains the 'hello.class'
  346.      file to the CLASSPATH setting (see above) so Java can find it.
  347.  
  348. With the sample scripts provided (NetRexxC.cmd or NetRexxC.bat), or the
  349. equivalent in the scripting language of your choice, the steps above can
  350. be combined into a simple single command:
  351.  
  352.   NetRexxC -run hello
  353.  
  354. This package also includes a trivial 'nrc.cmd' and matching 'nrc.bat'
  355. file that simply passes on its arguments to NetRexxC; 'nrc' is just a
  356. shorter name that saves keystrokes, so for the last example you could
  357. type:
  358.  
  359.   nrc -run hello
  360.  
  361. Note that scripts may be case-sensitive; unless running the OS/2 Rexx
  362. script, you will probably have to spell the name of the program exactly
  363. as it appears in the filename.
  364.  
  365. You could also edit the nrc.cmd or nrc.bat and add your favourite
  366. 'default' NetRexxC options there (if you do this, keep a backup copy, so
  367. that if you install a new version of the NetRexx package you won't
  368. overwrite your changes).
  369.  
  370. --- The NetRexx Home directory ---
  371.  
  372. If you need to put the NetRexxC.properties (messages) file into a
  373. directory other than the 'lib' directory below the Java home directory,
  374. then you can set an alternative directory path that NetRexx will use to
  375. find the messages file.
  376.  
  377. This alternative directory is called the NetRexx home directory and may
  378. be set using the -D option on the java command that invokes the NetRexx
  379. compiler.  For example (perhaps for an OS/2 or Windows system):
  380.  
  381.   java -Dnetrexx.home=f:\nrhome COM.ibm.netrexx.process.NetRexxC hello
  382.  
  383. which sets the directory path 'f:\nrhome' as the NetRexx home directory.
  384. With this setting, NetRexxC would look for the messages file as:
  385.  
  386.   f:\nrhome\lib\NetRexxC.properties
  387.  
  388. In other words, NetRexxC expects its properties file to be in the 'lib'
  389. directory below the NetRexx home directory, and the default NetRexx home
  390. directory is the Java home directory.
  391.  
  392. If you are using the NetRexxC.cmd on OS/2 to invoke the compiler, then
  393. this -D option will be set up automatically if the path is set as the
  394. value of an environment variable called NETREXX_HOME.
  395.  
  396.  
  397. Problems?
  398. '''''''''
  399. If the 'hello' example doesn't work, one of the following problems
  400. may be the cause:
  401.  
  402.   o A "Can't find class COM.ibm.netrexx.process.NetRexxC..." message
  403.     probably means that the NetRexxC.zip file has not been specified in
  404.     your CLASSPATH setting.  This is the setting that Java uses to find
  405.     classes for execution; please refer to your Java installation
  406.     instructions for information on setting the CLASSPATH.
  407.  
  408.   o A "Can't find class hello..." message may mean that the directory
  409.     with the .class file is not in your CLASSPATH, or either the
  410.     filename or name of the class (in the source) is spelled wrong (the
  411.     java command is [very] case-sensitive).
  412.  
  413.   o You didn't install on a file system that supports long file
  414.     names (for example, on OS/2 or Windows you should use an HPFS disk
  415.     or equivalent).  Like most Java applications, NetRexx uses long file
  416.     names.
  417.  
  418.   o You have a down-level Unzip or Tar program.  Check that the
  419.     file 'NetRexxC.properties', with just three capital letters and
  420.     neither part of the name truncated, exists in the subdirectory
  421.     'lib' below the Java home directory.
  422.  
  423.   o You have only the Java runtime installed, and not the toolkit.  If
  424.     the toolkit is installed, you should have a program called javac
  425.     on your computer.
  426.  
  427.   o You have a down-level version of Java installed.  NetRexxC will run
  428.     on Java versions 1.0.1, 1.0.2, 1.1 (and probably later versions).
  429.     You can check the version of Java you have installed using the
  430.     command 'java -version'.
  431.  
  432.   o Your Java toolkit installation has .class files from an earlier
  433.     installation in classes/java/lang, classes/netrexx/lang, or other
  434.     subdirectories in the 'classes' directory below the Java home
  435.     directory.
  436.  
  437.     A message that reports ambiguous class references is a likely sign
  438.     of this problem.  The easiest way to solve it is to re-install the
  439.     Java toolkit in a clean subdirectory.
  440.  
  441.   o If, when reporting an error or warning, the compiler gives a rather
  442.     cryptic identifier and reports 'Sorry, full message not available',
  443.     this means that it could not find the NetRexxC.properties (error
  444.     messages) file.
  445.  
  446.  
  447. Installation of just the NetRexx classes
  448. ''''''''''''''''''''''''''''''''''''''''
  449. To install only the NetRexx runtime classes (you don't need to do this
  450. if you already installed the NetRexxC compiler), follow the instructions
  451. for installing the compiler, but set your CLASSPATH to refer to
  452. NetRexxR.zip instead of NetRexxC.zip.  Only the NetRexxR.zip is needed,
  453. so you may prefer to extract just this file from the nrtools package.
  454.  
  455. The NetRexx class files can then be referred to from Java or NetRexx
  456. programs as from package 'netrexx.lang'.  For example, a string might be
  457. of class 'netrexx.lang.Rexx'.
  458.  
  459.  
  460. Using the NetRexx compiler
  461. """"""""""""""""""""""""""
  462. The installation instructions for the NetRexx compiler describe how to
  463. use the package you installed to compile and run a simple NetRexx
  464. program.  This section explains more of the options available to you.
  465.  
  466. --- Invoking the compiler as a command ---
  467.  
  468. The compiler is a Java program (class) which is called
  469. COM.ibm.netrexx.process.NetRexxC (NetRexxC for short). This can be
  470. invoked using the Java interpreter, for example, by the command:
  471.  
  472.   java COM.ibm.netrexx.process.NetRexxC
  473.  
  474. or by using a system-specific command (such as 'NetRexxC' or 'nrc').  In
  475. either case, the compiler invocation is followed by one or more program
  476. names (the program files to be compiled).  NetRexxC will add the
  477. extension '.nrx' to input program names (file specifications) if no
  478. extension was given.
  479.  
  480. So, for example, to compile 'hello.nrx', you can use any of:
  481.  
  482.   java COM.ibm.netrexx.process.NetRexxC hello
  483.   java COM.ibm.netrexx.process.NetRexxC hello.nrx
  484.   NetRexxC hello.nrx
  485.   nrc hello
  486.  
  487. (the first two should always work, the last two require that the
  488. system-specific command be available).  The resulting .class file is
  489. placed in the current directory.
  490.  
  491. On completion, the command will exit with one of three return values: 0
  492. if the compilation was successful, 1 if there were one or more Warnings,
  493. but no errors, and 2 if there were one or more Errors.
  494.  
  495. As well as file names, you can also specify various option words, which
  496. are distinguished by the first character of the word being '-'.  These
  497. may be any of the option words allowed on the NetRexx OPTIONS
  498. instruction (see the NetRexx language documentation), prefixed with '-'.
  499. These options words can be freely mixed with file specifications.
  500.  
  501. The compiler also implements some additional option words, which cannot
  502. be used on the OPTIONS instruction:
  503.  
  504.   o -keep       keep the intermediate .java file.  It is kept as
  505.                 xxx.java.keep, where xxx is the source file name.
  506.                 The file will be kept automatically if the javac
  507.                 compilation fails for any reason.
  508.  
  509.   o -nocompile  do not compile (just translate).  The intermediate Java
  510.                 program is kept as the file xxx.java, where xxx is the
  511.                 source file name.  Use this option when you want to use
  512.                 a different Java compiler.
  513.  
  514.   o -time       display translation, compile, and total times (for all
  515.                 files processed).
  516.  
  517. If you are using the provided NetRexxC or nrc scripts, then an
  518. additional option is available:
  519.  
  520.   o -run        run the resulting JAVA class as a stand-alone
  521.                 application, provided that the compilation had no
  522.                 errors.
  523.  
  524. Here are some examples:
  525.  
  526.   java COM.ibm.netrexx.process.NetRexxC hello -keep -strictargs
  527.   java COM.ibm.netrexx.process.NetRexxC -keep hello wordclock
  528.   java COM.ibm.netrexx.process.NetRexxC hello wordclock -nocompile
  529.   nrc hello
  530.   nrc hello.nrx
  531.   nrc -run hello
  532.   nrc -run Spectrum -keep
  533.   nrc hello -binary -verbose1
  534.   nrc hello -noverbose -format -keep
  535.  
  536. Option words may be specified in lowercase, mixed case, or uppercase.
  537. File specifications are platform-dependent and may be case sensitive,
  538. though NetRexxC will always prefer an exact case match over a mismatch.
  539.  
  540. Note that the -run option is implemented by the script, not the
  541. compiler; some scripts (such as NetRexxC.bat) may require that the
  542. '-run' be the first word of the command arguments, and/or be in
  543. lowercase.  They may also require that only the name of the file be
  544. given if the -run option is used.
  545.  
  546. See also the earlier section "The NetRexx home directory" if you need to
  547. change the place where the compiler finds its messages (for example, if
  548. error messages report 'Sorry, full message unavailable').
  549.  
  550. --- Invoking the compiler from Java ---
  551.  
  552. The compiler may also be called from a Java program directly, by
  553. invoking the method in the COM.ibm.netrexx.process.NetRexxC class
  554. described as follows:
  555.  
  556.   method main(arg=Rexx) constant returns int
  557.  
  558. The Rexx string passed to the method can be any combination of program
  559. names and options (except -run), as described above.  A sample program
  560. that invokes the NetRexx compiler to compile a program called 'test' is:
  561.  
  562.  /* compiletest.nrx */
  563.  s='test -keep -verbose4 -utf8'
  564.  say COM.ibm.netrexx.process.NetRexxC.main(s)
  565.  
  566. The returned int value will be one of the return values described above.
  567.  
  568. NetRexxC is thread-safe (the only static properties are constants), but
  569. it is not known whether javac is thread-safe.  Hence the invocation of
  570. multiple instances of NetRexxC on different threads should probably
  571. specify -nocompile, for safety.
  572.  
  573.  
  574. NetRexx classes and Applets for the Web
  575. """""""""""""""""""""""""""""""""""""""
  576. If you write applets for the World Wide Web (or your intranet) in
  577. NetRexx, you will probably need to use the NetRexx classes
  578. (netrexx.lang.Rexx, _etc._); they will be used automatically if the
  579. default compilation options (specifically, options nobinary) are in
  580. effect.
  581.  
  582. A good way of setting up an HTTP (Web) server for this is to keep all
  583. your applets in one subdirectory; you can then make the NetRexx runtime
  584. classes (that is, the classes in the package known by Java as
  585. netrexx.lang) available to all the applets by unzipping NetRexxR.zip
  586. into a subdirectory netrexx/lang below your applets directory.
  587.  
  588. For example, if the root of your server tree is
  589.  
  590.   D:/mydata
  591.  
  592. then you might put your applets into
  593.  
  594.   D:/mydata/applets
  595.  
  596. and then the NetRexx classes (unzipped from NetRexxR.zip) should be in
  597. the directory
  598.  
  599.   D:/mydata/applets/netrexx/lang
  600.  
  601. The same principle is applied if you have any other Java packages that
  602. you want to make available to your applets: the classes in a package
  603. called fred.math.quicksorts would go in a subdirectory below applets
  604. called fred/math/quicksorts, for example.
  605.  
  606. Note that with Java 1.1 it should be possible to use the classes direct
  607. from the NetRexxR.zip file, providing that the browser being used is at
  608. a Java 1.1 level.  See the Java 1.1 documentation for details.
  609.  
  610.  
  611. Printable documentation
  612. """""""""""""""""""""""
  613. The NetRexx printable package (NetRexxD.zip, or NetRexxD.tar.Z) contains
  614. the printable NetRexx documentation, in PostScript format.
  615.  
  616.   1. Copy the package file to the root directory of your choice for
  617.      documentation, preserving the original name.
  618.  
  619.   2. With your chosen directory as your current directory, unpack the
  620.      package, following the instructions in 'Unpacking NetRexx packages'
  621.      above.
  622.  
  623.      This should add the directory 'NetRexxD' to your chosen directory,
  624.      containing the printable documentation for NetRexx.
  625.  
  626.   3. You can print files from the new directory that have the extension
  627.      '.ps' on any PostScript printer, using the appropriate method for
  628.      printing for your operating system.  There are also utilities, such
  629.      as 'GhostScript', available from public sources for viewing
  630.      PostScript files and for printing them on non-PostScript printers.
  631.  
  632.  
  633. Current restrictions
  634. """"""""""""""""""""
  635. The NetRexx processor is now functionally complete, though work
  636. continues on usability and performance improvements.  As of this version
  637. there are still a number of restrictions, listed below.
  638.  
  639. Please note that the presence of an item in this section is not a
  640. commitment to remove a restriction in some future update; NetRexx
  641. enhancements are dependent on on-going research, your feedback, and
  642. available resources.  You should treat this list as a 'wish-list' (and
  643. please send in your wishes).
  644.  
  645. --- Short-term restrictions ---
  646.  
  647. NetRexxC by default uses the javac compiler to generate bytecodes (class
  648. file).
  649.  
  650.   o The 1.0 javac compiler will not let you compile a class that has the
  651.     same name as a class in java.lang.  This has been fixed for 1.1.
  652.  
  653. The following problem may occur in larger methods, with Java 1.0.1 or
  654. 1.0.2 (it has been fixed in 1.1):
  655.  
  656.   o NetRexxC does not restrict the number of local variables used or
  657.     generated.  However, the 1.0 javac compiler fails with unrelated
  658.     error messages (such as 'statement unreachable' or 'variable may be
  659.     uninitialized') if asked to handle more than 63 local variables.
  660.  
  661. --- Long term restrictions ---
  662.  
  663. The following restrictions are due to the use of a translator, and would
  664. probably only be lifted if a direct-to-bytecodes NetRexx compiler were
  665. built.
  666.  
  667.   o Externally-visible names (property, method, and class names) cannot
  668.     be Java reserved words (you probably want to avoid these anyway).
  669.     JAVAC will report these, giving the line numbers in your NetRexx
  670.     program.
  671.  
  672.   o Some binary floating point underflows may be treated as zero instead
  673.     of being trapped as errors.
  674.  
  675.   o Side-effects of calls to this() and super() in constructors may be
  676.     seen before the method and method call instructions are traced --
  677.     this is because Java does not permit tracing instructions to be
  678.     added before the call to this() or super().
  679.  
  680.   o The results of expressions consisting of the single term 'null' are
  681.     not traced.
  682.