For a presentation on NetRexx this coming week I have downloaded
NetRexx 3.01 and just tried to use it with the help of an uninitiated,
but Rexx-savvy person, right after downloading:
it failed !The program, "hello.nrx", was simple: say 'NetRexx says: Hello, world! ' This is using the installed Java (on Windows XP SP3), i.e. JRE 1.6: F:\download\Rexx\NetRexx\opensource\developer\3.01-RC1\NetRexx-3.01RC1\bin>java -version This is the scenario/use case: If you look at the output, before the stack trace, you see that the program got interpreted successfully! However, an exception follows with a stack trace, informing the user that something went wrong. This is surprising as NetRexx informs the user: "-exec -- interpret with no argument words". So why would NetRexx try to compile a NetRexx program right after it successfully (without any errors) interpreted it? Throwing an exception, indicating that something bad has happened? You think employing NetRexx for the first time is easy? The distribution package is "Rexxish" in that it makes it easy for anyone interested to experiment/try out NetRexx successfully ? --- Sympathizing with Bob H. :) ---rony P.S.: The problem above is caused by a wrong sequence of arguments, the correct sequence would be "NetRexxC.bat hello.nrx -exec". >From a usability point of view (especially for newcomers) the arguments should be checked and if not supplied in the correct sequence (yielding unexpected, erroneous behaviour like above) should cause a clear, easy understandable error-message for the user. [One should expect that people would first supply the dash-options followed by the file name and then the arguments, as they usually learn that sequence, if working on command lines.] P.P.S.: For completeness: here's the NetRexxC output, if just invoking it: BTW, the URL in the above output ("http://www.netrexx.org/files/nrl3.pdf") cannot be resolved and is therefore wrong.F:\download\Rexx\NetRexx\opensource\developer\3.01-RC1\NetRexx-3.01RC1\bin>NetRexxC.bat NetRexx portable processor NetRexx 3.01RC1, build 40-20110905-2355 Copyright (c) RexxLA, 2011. All rights reserved. Parts Copyright (c) IBM Corporation, 1995,2008. Arguments are: in_file_specification... [-option]... In brief, NetRexxC-specific options are: -arg words -- interpret; remaining words are arguments -compile -- compile (default; -nocompile implies -keep) -console -- display messages on console (default) -exec -- interpret with no argument words -keep -- keep any completed .java file (as xxx.java.keep) -keepasjava -- keep any completed .java file (as xxx.java) -prompt -- prompt for new request after processing -savelog -- save messages in NetRexxC.log -time -- display timings -warnexit0 -- exit with a zero returncode on warnings Any NetRexx options may also be added; these are: -binary -- all classes are binary classes -comments -- copy comments across to generated .java -compact -- display error messages in compact form -crossref -- generate cross-reference listing -decimal -- allow implicit decimal arithmetic -diag -- show diagnostic messages -explicit -- local variables must be explicitly declared -java -- generate Java source code for this program -logo -- display logo (banner) after starting -format -- format output file (pretty-print) -replace -- replace .java file even if it exists -sourcedir -- force output files to source directory -strictargs -- empty argument lists must be specified as () -strictassign -- assignment must be cost-free -strictcase -- names must match in case -strictimport -- all imports must be explicit -strictprops -- even local properties must be qualified -strictsignal -- signals list must be explicit -symbols -- include symbols table in generated .class files -trace[n] -- trace stream [1 or 2], or 0 for NOTRACE -utf8 -- source file is in UTF8 encoding -verbose[n] -- verbosity of progress reports [0-5] All options may have prefix 'no' added for the inverse effect. Please see the NetRexx Language definition at http://www.netrexx.org/files/nrl3.pdf for more details. Of course, one can argue that it clearly says that the input file is the first argument, but it is to be expected that first-timers are missing that detail, concentrating on the wealth of available dash-options. P.P.P.S.: There is another bug, if using the "-run" switch with NetRexxC.bat: [Running with "NetRexxC.bat -run hello" works, i.e. leaving out the file type.]F:\download\Rexx\NetRexx\opensource\developer\3.01-RC1\NetRexx-3.01RC1\bin>NetRexxC.bat -run hello.nrx NetRexx portable processor, version NetRexx 3.01RC1, build 40-20110905-2355 Copyright (c) RexxLA, 2011. All rights reserved. Parts Copyright (c) IBM Corporation, 1995,2008. Program hello.nrx Compilation of 'hello.nrx' successful Running hello.nrx... Exception in thread "main" java.lang.NoClassDefFoundError: hello/nrx Caused by: java.lang.ClassNotFoundException: hello.nrx at java.net.URLClassLoader$1.run(URLClassLoader.java:202) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:307) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:248) Could not find the main class: hello.nrx. Program will exit. F:\download\Rexx\NetRexx\opensource\developer\3.01-RC1\NetRexx-3.01RC1\bin> >From a user experience it would be important to check whether the argument in the context of the desired operation is correct (supplied as expected), and if not, then an appropriate error message should be issued. Also in the case that NetRexx sees a class having a file-type of ".nrx" and not being able of find it, then NetRexx could try again, by leaving out the file type (which would find the missing class, so no error message needs to be issued in this case; a counter argument would be that no mind-guessing should take place by NetRexx, rather the user should be pointed at the error; maybe the error message then could give a hint about the expected usage?). P.P.P.P.S.: Last, but not least: "bin/NetRexxC.cmd" is a Rexx-program. The filetype ".cmd" dates back to OS/2 dates where cmd-files could contain batch or Rexx scripts. In todays world OS/2 has no role anymore and ".cmd" is usually associated with Windows batch files. Therefore it would make sense to rename it to gain a ".rex" filetype, hence: "NetRexxC.rex". This also would make it intuitively clear, that it does not contain a NetRexx program. _______________________________________________ Ibm-netrexx mailing list [hidden email] Online Archive : http://ibm-netrexx.215625.n3.nabble.com/ |
Correction: NetRexx 3.01 by default is dependent on tools.jar as long as
the option "-nocompile" is not added! Therefore in the previously given example, with no tools.jar on CLASSPATH needs to be invoked with "NetRexxC.bat hello.nrx -exec -nocompile" to run successfully! Sympathizing even more with Bob H.! :) ---rony _______________________________________________ Ibm-netrexx mailing list [hidden email] Online Archive : http://ibm-netrexx.215625.n3.nabble.com/ |
In reply to this post by Rony G. Flatscher (wu-wien)
NetRexxDE is now working on two LapTops but on an older desktop will sometimes compile but not run. The program, RexxTry.nrx is:
Say Date(); Exit; Sometimes this will produce a .java file; sometimes i get the same results as you show. Very perplexing to say the least. Bob Hamilton Richardson Texas USA On Sat, Sep 24, 2011 at 11:03 AM, Rony G. Flatscher <[hidden email]> wrote:
_______________________________________________ Ibm-netrexx mailing list [hidden email] Online Archive : http://ibm-netrexx.215625.n3.nabble.com/ |
In reply to this post by Rony G. Flatscher (wu-wien)
While technically these are user errors, I see your point that they
are unexpected behaviors for someone new to NetRexx. These should be
filed on Kenai as new issues. They can probably be changed fairly
easily although some are caused by the limitations of Microsoft's
horrible "bat" code.
-- Kermit On 9/24/2011 9:03 AM, Rony G. Flatscher wrote: For a presentation on NetRexx this coming week I have downloaded NetRexx 3.01 and just tried to use it with the help of an uninitiated, but Rexx-savvy person, right after downloading: _______________________________________________ Ibm-netrexx mailing list [hidden email] Online Archive : http://ibm-netrexx.215625.n3.nabble.com/ |
In reply to this post by Rony G. Flatscher (wu-wien)
Rony,
this problem *again* has nothing to do with NetRexxC at all. The fact is, that the Java tools.jar, which does contain javac, is simply *not found*. You student will have to copy tools.jar from the ...JDK...\bin\lib\ directory to the ...\JDK...\jre\lib\ directory. That is a general Java installation problem. The compilation is probably done because you didn't use the option -interpret, and thus NetRexx does compile your stuff. Greetings, Thomas. =========================================================== Am 24.09.2011 18:03, schrieb Rony G. Flatscher: For a presentation on NetRexx this coming week I have downloaded NetRexx 3.01 and just tried to use it with the help of an uninitiated, but Rexx-savvy person, right after downloading: --
Thomas Schneider (Founder of www.thsitc.com) Member of the Rexx Languge Asscociation (www.rexxla.org) Member of the NetRexx Developer's Team (www.netrexx.org) _______________________________________________ Ibm-netrexx mailing list [hidden email] Online Archive : http://ibm-netrexx.215625.n3.nabble.com/
Thomas Schneider, Vienna, Austria (Europe) :-)
www.thsitc.com www.db-123.com |
In reply to this post by Rony G. Flatscher (wu-wien)
Hi Rony -
I tried to duplicate your errors so I could enter issues for them on Kenai. Looking at the docs in NetRexxC.bat and the user guide and verified by testing, I found that the order of the operands does not matter with the exception of "-args" which passes everything following it to the program as arguments. I do agree that -exec should imply a default of -nojava and -nocompile which will require changes both to NetRexx source code and the user guide. I will file an issue requesting that change. Your problem with the -run operand can be handled by changing the line in NetRexxC.bat that says "Java %1" to the following: IF EXIST %1.class (java %1) ELSE echo Incorrect file name format for run option - do not add .nrx I will file an issue for that change also. (I wish bat code allowed us to auto correct the file name.) -- Kermit PS to all: Please remember that we have a change and error reporting process now. If you find problems like these, report them so they can be taken care of! On 9/24/2011 9:03 AM, Rony G. Flatscher wrote: For a presentation on NetRexx this coming week I have downloaded NetRexx 3.01 and just tried to use it with the help of an uninitiated, but Rexx-savvy person, right after downloading: _______________________________________________ Ibm-netrexx mailing list [hidden email] Online Archive : http://ibm-netrexx.215625.n3.nabble.com/ |
Hi Kermit,
On 24.09.2011 21:39, Kermit Kiser wrote: I tried to duplicate your errors so I could enter issues for them on Kenai. Looking at the docs in NetRexxC.bat and the user guide and verified by testing, I found that the order of the operands does not matter with the exception of "-args" which passes everything following it to the program as arguments. I do agree that -exec should imply a default of -nojava and -nocompile which will require changes both to NetRexx source code and the user guide. I will file an issue requesting that change.Thank you very much for your efforts! PS to all: Please remember that we have a change and error reporting process now. If you find problems like these, report them so they can be taken care of!Would you have an URL handy that would lead one directly to the page where one can enter new issues? ---rony _______________________________________________ Ibm-netrexx mailing list [hidden email] Online Archive : http://ibm-netrexx.215625.n3.nabble.com/ |
Rony -
Here is the direct link to the issues page on Kenai: http://kenai.com/jira/browse/NETREXX The links to create new issues are on the upper right of the page. -- Kermit PS: For some mysterious reason the actual list of current issues is hidden behind the "More" links on the page. On 9/25/2011 2:19 AM, Rony G. Flatscher wrote: Hi Kermit, _______________________________________________ Ibm-netrexx mailing list [hidden email] Online Archive : http://ibm-netrexx.215625.n3.nabble.com/ |
Free forum by Nabble | Edit this page |