ReyC: The Rey Compiler release 0.1

classic Classic list List threaded Threaded
17 messages Options
Reply | Threaded
Open this post in threaded view
|

ReyC: The Rey Compiler release 0.1

Thomas.Schneider.Wien
Hi there,
I´m in the final stages to release my Rey Compiler, the successor of
www.Rexx2Nrx.com
release 0.1 to the public.

This release will - at this minute -. only support *classic Rexx*.

David Requena, here at this group, has been so kind to act as my *SVN*
administrator.

He will get the (open source) version of ReyC for cataloging it.

When that´s done, you might download iut, try it, give comments, or
whatever.

When interested in this project, polease

*join group* *reyC* there at www.kenai.com.

Greeetings from Vienna,
Thomas Schnbeider.

PS: we are currently in the process here to deliver the time schedule
for ReyC supporting PL/I and COBOL
as the source klanguages as well.,

All Rexx dialects will be for free!

COBOL and PL&/I will rrequire a Licence, with some fees, depending on the
number of source-lines porocessed!

See you!
Tom.
_______________________________________________
Ibm-netrexx mailing list
[hidden email]

Tom. (ths@db-123.com)
Reply | Threaded
Open this post in threaded view
|

newbee still struggling

kenner

I have java installed and working. I have NetRexxC.jar in the PATH. But it is still not getting found.


 CP1ZA /u/a00002t % java -version
java version "1.5.0"
Java(TM) 2 Runtime Environment, Standard Edition (build pmz64dev-20091106 (SR11 ))
IBM J9 VM (build 2.3, J2RE 1.5.0 IBM J9 2.3 z/OS s390x-64 j9vmmz6423-20091104 (JIT e
J9VM - 20091103_45935_BHdSMr
JIT  - 20091016_1845_r8
GC   - 20091026_AA)
JCL  - 20091106
 CP1ZA /u/a00002t % setenv
TZ=UTC0
PATH=/u/a00002t:/usr/local/bin:/bin:/usr/sbin:/usr/lpp/java/J5.0_64/bin:/usr/lpp/java/J5.0_64/lib/ext:/usr/lpp/java/J5.0_64/lib/NetRexxC.jar:/usr/lpp/java/J5.0_64/lib/ext/NetRexxC.jar
TERM=xterm
LOGNAME=A00002T
SHELL=/bin/tcsh
HOME=/u/a00002t
HOSTTYPE=z/OS
VENDOR=ibm
OSTYPE=posix
MACHTYPE=z/OS
SHLVL=1
PWD=/u/a00002t
USER=A00002T
GROUP=ITS
HOST=CP1ZA
 CP1ZA /u/a00002t % ls
*                   NetRexxC.jar        mydf                smprept.apr27.2010
A00002T.CP1Y.HFS    NetRexxC.jar2       mysed               tandf.class
CP1Y                NetRexxC.sh         nrc                 tandf.nrx
JRBADIR.HTM         awkdf               output.file         tandf.txt
Junetest            awkls               output.txt          temp
 CP1ZA /u/a00002t % nrc tandf.nrx

The java class is not found:  COM.ibm.netrexx.process.NetRexxC
 CP1ZA /u/a00002t % find / -name NetRexxC.jar
/u/a00002t/NetRexxC.jar
/usr/lpp/java/J5.0_64/lib/ext/NetRexxC.jar
/usr/lpp/java/J5.0_64/lib/NetRexxC.jar
_______________________________________________
Ibm-netrexx mailing list
[hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: newbee still struggling

David Requena
Hm.. Not good, I see two distinct problems:

- You need a full jdk not just the jre a shown in your quoted output. Try executing 'javac' to see if you have a jdk installed. If not, download from java.sun.com.

- NetRexxC.jar needs to be placed in the 'classpath' instead of the 'path'. Several posibilities here. One woul be to copy the jar file to the jdkhome/lib/ext directory (jdkhome woul be the folder where you installed your jdk)

Hope that helps

Saludos / Best regards, David Requena

-----Original Message-----
From: [hidden email]
Sender: [hidden email]
Date: Wed, 16 Jun 2010 12:52:40
To: IBM Netrexx<[hidden email]>
Reply-To: IBM Netrexx <[hidden email]>
Subject: [Ibm-netrexx] newbee still struggling

_______________________________________________
Ibm-netrexx mailing list
[hidden email]



_______________________________________________
Ibm-netrexx mailing list
[hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: newbee still struggling

alansam


On 16 June 2010 10:21, David Requena <[hidden email]> wrote:
Hm.. Not good, I see two distinct problems:

- You need a full jdk not just the jre a shown in your quoted output. Try executing 'javac' to see if you have a jdk installed. If not, download from java.sun.com.


Be careful here Kenneth. I see that you're on z/OS so your Java installation is from IBM not Sun.  Sun's JDK won't work on z/OS, you will need to get the JDK from IBM.

If the shell you're using is MKS you can also use the "type" command to check that javac in in your path.  e.g:

> type javac
javac is /usr/lpp/java/J5.0_64/bin/javac

BTW.  I see more problems with your PATH declaration.
  • As David mentions, JAR files don't go in the PATH environment variable, they either go in the CLASSPATH variable or after a -cp or -classpath switch on the command line.
  • You shouldn't have the Java extension directory (/usr/lpp/java/J5.0_64/bin:/usr/lpp/java/J5.0_64/lib/ext) in your PATH either.  It doesn't/shouldn't contain anything executable and Java will find it automatically anyway.
  • Following on from above: don't put any JAR files from the Java extension directory in the CLASSPATH declaration either.  It is managed by Java and classes contained therein are automatically referenced at run-time.

Alan.

--
Can't tweet, won't tweet!

_______________________________________________
Ibm-netrexx mailing list
[hidden email]

Alan

--
Needs more cowbell.
Reply | Threaded
Open this post in threaded view
|

Re: newbee still struggling

alansam


On 16 June 2010 11:13, Alan Sampson <[hidden email]> wrote:
If the shell you're using is MKS you can also use the "type" command to check that javac in in your path.  e.g:

> type javac
javac is /usr/lpp/java/J5.0_64/bin/javac


On further review, it would appear that you're not using MKS but tcsh (I think setenv is a tcsh built-in command); in which case type won't work.  Try the which and/or where commands instead.  e.g:

> which javac
/usr/lpp/java/J5.0_64/bin/javac
> where javac
/usr/lpp/java/J5.0_64/bin/javac
/usr/lpp/java/J1.4/bin/javac


Alan.
--
Can't tweet, won't tweet!

_______________________________________________
Ibm-netrexx mailing list
[hidden email]

Alan

--
Needs more cowbell.
Reply | Threaded
Open this post in threaded view
|

Re: newbee still struggling

kenner
In reply to this post by David Requena

 CP1ZA /u/a00002t % javac -version
javac 1.5.0
javac: no source files
Usage: javac <options> <source files>

 CP1ZA /u/a00002t % env
TZ=UTC0
PATH=/u/a00002t:/usr/local/bin:/bin:/usr/sbin:/usr/lpp/java/J5.0_64/bin:/usr/lpp/java/J5.0_64/lib/ext:/usr/lpp/java/J5.0_64/lib/NetRexxC.jar:/usr/lpp/java/J5.0_64/lib/ext/NetRexxC.jar
TERM=xterm
LOGNAME=A00002T
SHELL=/bin/tcsh
HOME=/u/a00002t
HOSTTYPE=z/OS
VENDOR=ibm
OSTYPE=posix
MACHTYPE=z/OS
SHLVL=1
PWD=/u/a00002t
USER=A00002T
GROUP=ITS
HOST=CP1ZA
CLASSPATH=/u/a00002t:/usr/local/bin:/bin:/usr/sbin:/usr/lpp/java/J5.0_64/bin:/usr/lpp/java/J5.0_64/lib/ext:/usr/lpp/java/J5.0_64/lib/NetRexxC.jar:/usr/lpp/java/J5.0_64/lib/ext/NetRexxC.jar
 CP1ZA /u/a00002t % nrc tandf.nrx
The java class is not found:  COM.ibm.netrexx.process.NetRexxC

It seems I have the 1.5.0 version of the JDK.
I put the CLASSPATH in my .tcshrc, but still no joy.  

Kenneth Klein
Systems Specialist
502-868-3644
859-750-5179 (Cell)
502-868-2298 (Fax)
[hidden email]



"David Requena" <[hidden email]>
Sent by: [hidden email]

06/16/2010 01:41 PM

Please respond to
[hidden email]; Please respond to
IBM Netrexx <[hidden email]>

To
"IBM Netrexx" <[hidden email]>
cc
Subject
Re: [Ibm-netrexx] newbee still struggling





Hm.. Not good, I see two distinct problems:

- You need a full jdk not just the jre a shown in your quoted output. Try executing 'javac' to see if you have a jdk installed. If not, download from java.sun.com.

- NetRexxC.jar needs to be placed in the 'classpath' instead of the 'path'. Several posibilities here. One woul be to copy the jar file to the jdkhome/lib/ext directory (jdkhome woul be the folder where you installed your jdk)

Hope that helps

Saludos / Best regards, David Requena

-----Original Message-----
From: [hidden email]
Sender: [hidden email]
Date: Wed, 16 Jun 2010 12:52:40
To: IBM Netrexx<[hidden email]>
Reply-To: IBM Netrexx <[hidden email]>
Subject: [Ibm-netrexx] newbee still struggling

_______________________________________________
Ibm-netrexx mailing list
[hidden email]



_______________________________________________
Ibm-netrexx mailing list
[hidden email]



_______________________________________________
Ibm-netrexx mailing list
[hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: newbee still struggling

kenner
In reply to this post by alansam

 CP1ZA /u/a00002t % type javac
javac is /usr/lpp/java/J5.0_64/bin/javac

See below the results after tweaking the path and classpath as directed.


Kenneth Klein
Systems Specialist
502-868-3644
859-750-5179 (Cell)
502-868-2298 (Fax)
[hidden email]



Alan Sampson <[hidden email]>
Sent by: [hidden email]

06/16/2010 02:32 PM

Please respond to
IBM Netrexx <[hidden email]>

To
[hidden email], IBM Netrexx <[hidden email]>
cc
Subject
Re: [Ibm-netrexx] newbee still struggling







On 16 June 2010 10:21, David Requena <drequena@...> wrote:
Hm.. Not good, I see two distinct problems:

- You need a full jdk not just the jre a shown in your quoted output. Try executing 'javac' to see if you have a jdk installed. If not, download from
java.sun.com.


Be careful here Kenneth. I see that you're on z/OS so your Java installation is from IBM not Sun.  Sun's JDK won't work on z/OS, you will need to get the JDK from IBM.

If the shell you're using is MKS you can also use the "type" command to check that javac in in your path.  e.g:

> type javac
javac is
/usr/lpp/java/J5.0_64/bin/javac

 CP1ZA /u/a00002t % env
TZ=UTC0
PATH=/u/a00002t:/usr/local/bin:/bin:/usr/sbin:/usr/lpp/java/J5.0_64/bin
TERM=xterm
LOGNAME=A00002T
SHELL=/bin/tcsh
HOME=/u/a00002t
HOSTTYPE=z/OS
VENDOR=ibm
OSTYPE=posix
MACHTYPE=z/OS
SHLVL=1
PWD=/u/a00002t
USER=A00002T
GROUP=ITS
HOST=CP1ZA
CLASSPATH=/u/a00002t:/usr/local/bin:/bin:/usr/sbin:/usr/lpp/java/J5.0_64/bin:/usr/lpp/java/J5.0_64/lib/ext
 CP1ZA /u/a00002t % nrc tandf.nrx
The java class is not found:  COM.ibm.netrexx.process.NetRexxC

BTW.  I see more problems with your PATH declaration.
  • As David mentions, JAR files don't go in the PATH environment variable, they either go in the CLASSPATH variable or after a -cp or -classpath switch on the command line.
  • You shouldn't have the Java extension directory (/usr/lpp/java/J5.0_64/bin:/usr/lpp/java/J5.0_64/lib/ext) in your PATH either.  It doesn't/shouldn't contain anything executable and Java will find it automatically anyway.
  • Following on from above: don't put any JAR files from the Java extension directory in the CLASSPATH declaration either.  It is managed by Java and classes contained therein are automatically referenced at run-time.

Alan.

--
Can't tweet, won't tweet!
_______________________________________________
Ibm-netrexx mailing list
[hidden email]



_______________________________________________
Ibm-netrexx mailing list
[hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: newbee still struggling

alansam


On 17 June 2010 07:03, <[hidden email]> wrote:


 CP1ZA /u/a00002t % type javac
javac is /usr/lpp/java/J5.0_64/bin/javac

See below the results after tweaking the path and classpath as directed.


Hi,

I took a look at a z/OS setup I have and see that I didn't put the NetRexx things in the Java extensions directory.  (Probably due to authorization issues.)

My CLASSPATH is much simpler than yours but it does have one important addition: Java's tools.jar.

Here's my CLASSPATH:

> echo $CLASSPATH
/u/alan/lib/alan.jar:/usr/lpp/java/J5.0/lib/tools.jar:/usr/local/share/NetRexx/lib/NetRexxC.jar

and the salient parts of my PATH:

> echo $PATH:
/usr/lpp/java/J5.0/bin:/usr/local/share/NetRexx/bin:/u/alan/bin:/usr/local/bin:/bin:...

Bringing this all together, the I'm able to compile the following NetRexx program:

~/tmp> cat hello.nrx
/* A program, written in NetRexx */
Options replace format comments java crossref savelog symbols binary

say 'Hello World!'

~/tmp> nrc -run hello -keep

NetRexx portable processor, version 2.05
Copyright (c) IBM Corporation, 2005.  All rights reserved.
Program hello.nrx
Compilation of 'hello.nrx' successful
Running hello...
Hello World!
~/tmp> ls hello*

hello.class      hello.java.keep  hello.nrx
~/tmp> java hello
Hello World!

I observe from your earlier post that you have copied some elements from your PATH into CLASSPATH.  You don't need to do that: PATH is used by your shell to find programs, CLASSPATH is used by Java to locate classes.  (Typically Java is the only user of the CLASSPATH environment variable.)  It should only contain references to fully qualified JAR files and/or directories that contain Java classes.  You should remove /usr/local/bin:/bin:... etc. from your CLASSPATH there shouldn't be any Java classes in those directories.

Alan.
--
Can't tweet, won't tweet!

_______________________________________________
Ibm-netrexx mailing list
[hidden email]

Alan

--
Needs more cowbell.
Reply | Threaded
Open this post in threaded view
|

Re: newbee still struggling

kenner

Alan

Thanks loads. It's working, well, working better. At least I found the netrexx jar file. Next hurdle: Where do I find this java.lang.Object and how do I point java to it?

 CP1ZA /u/a00002t % echo $PATH
/u/a00002t:/usr/local/bin:/bin:/usr/sbin:/usr/lpp/java/J5.0_64/bin
 CP1ZA /u/a00002t % echo $CLASSPATH
/usr/lpp/java/J5.0_64/lib/NetRexxC.jar:/usr/lpp/java/J5.0_64/lib/tools.jar
 CP1ZA /u/a00002t % ls
*                   Junetest            hfsstats            output.file         tandf.nrx
A00002T.CP1Y.HFS    NetRexxC.sh         mydf                output.txt          tandf.txt
CP1Y                awkdf               mysed               smprept.apr27.2010  temp
JRBADIR.HTM         awkls               nrc                 tandf.class

 CP1ZA /u/a00002t % nrc tandf.nrx
NetRexx portable processor, version 2.02
Copyright (c) IBM Corporation, 2001.  All rights reserved.
Program tandf.nrx [pass 2, over 3 clauses]
   +++ Error: The class 'java.lang.Object' cannot be found
Compilation of 'tandf.nrx' failed [one error]




Kenneth Klein

_______________________________________________
Ibm-netrexx mailing list
[hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: newbee still struggling

alansam


On 18 June 2010 10:34, <[hidden email]> wrote:

Alan

Thanks loads. It's working, well, working better. At least I found the netrexx jar file. Next hurdle: Where do I find this java.lang.Object and how do I point java to it?

 CP1ZA /u/a00002t % echo $PATH
/u/a00002t:/usr/local/bin:/bin:/usr/sbin:/usr/lpp/java/J5.0_64/bin
 CP1ZA /u/a00002t % echo $CLASSPATH
/usr/lpp/java/J5.0_64/lib/NetRexxC.jar:/usr/lpp/java/J5.0_64/lib/tools.jar
 CP1ZA /u/a00002t % ls
*                   Junetest            hfsstats            output.file         tandf.nrx
A00002T.CP1Y.HFS    NetRexxC.sh         mydf                output.txt          tandf.txt
CP1Y                awkdf               mysed               smprept.apr27.2010  temp
JRBADIR.HTM         awkls               nrc                 tandf.class

 CP1ZA /u/a00002t % nrc tandf.nrx
NetRexx portable processor, version 2.02
Copyright (c) IBM Corporation, 2001.  All rights reserved.
Program tandf.nrx [pass 2, over 3 clauses]
   +++ Error: The class 'java.lang.Object' cannot be found
Compilation of 'tandf.nrx' failed [one error]

Kenneth,

It's odd that Java can't find java.lang.Object as its the guts of Java.  Basically, as Java is a purely "object oriented" programming environment, just about everything is an instance of java.lang.Object.  (Some of the primitive data types like int, long, boolean etc. aren't but I think that's just confusing the issue.)

It's just possible that your Java isn't installed correctly, try this: create the following Jhello.java file and compile & run it:

~/tmp> cat Jhello.java

public class Jhello {

  public static void main(String[] args) {

    System.out.println();
    System.out.println("Hello world!");
    System.out.println();

    return;
  }
}

~/tmp> javac -g Jhello.java
~/tmp> java Jhello

Hello world!

If that works your Java compiler's correctly installed.

I think I've seen this problem before though.  I'll go look to see if I have any references to this in the mail archive.

Regards,
Alan.

--
Can't tweet, won't tweet!

_______________________________________________
Ibm-netrexx mailing list
[hidden email]

Alan

--
Needs more cowbell.
Reply | Threaded
Open this post in threaded view
|

Re: newbee still struggling

kenner

 CP1ZA /u/a00002t % javac -g -verbose Jhello.java
[parsing started Jhello.java]
[parsing completed 689ms]
[search path for source files: [/usr/lpp/java/J5.0_64/lib/NetRexxC.jar, /usr/lpp/java/J5.0_64/lib/tools.jar]]
[search path for class files: [/usr/lpp/java/J5.0_64/lib/vm.jar, /usr/lpp/java/J5.0_64/lib/core.jar, /usr/lpp/java/J5.0_64/lib/charsets.jar, /usr/lpp/java/J5.0_64/lib/graphics.jar, /usr/lpp/java/J5.0_64/lib/security.jar, /usr/lpp/java/J5.0_64/lib/ibmpkcs.jar, /usr/lpp/java/J5.0_64/lib/ibmorb.jar, /usr/lpp/java/J5.0_64/lib/ibmcfw.jar, /usr/lpp/java/J5.0_64/lib/ibmorbapi.jar, /usr/lpp/java/J5.0_64/lib/ibmjcefw.jar, /usr/lpp/java/J5.0_64/lib/ibmjgssprovider.jar, /usr/lpp/java/J5.0_64/lib/ibmjsseprovider2.jar, /usr/lpp/java/J5.0_64/lib/ibmcertpathprovider.jar, /usr/lpp/java/J5.0_64/lib/server.jar, /usr/lpp/java/J5.0_64/lib/xml.jar, /usr/lpp/java/J5.0_64/lib/ext/dtfj.jar, /usr/lpp/java/J5.0_64/lib/ext/dtfj-interface.jar, /usr/lpp/java/J5.0_64/lib/ext/gskikm.jar, /usr/lpp/java/J5.0_64/lib/ext/healthcenter.jar, /usr/lpp/java/J5.0_64/lib/ext/ibmcmsprovider.jar, /usr/lpp/java/J5.0_64/lib/ext/ibmjcecca.jar, /usr/lpp/java/J5.0_64/lib/ext/ibmjcefips.jar, /usr/lpp/java/J5.0_64/lib/ext/ibmjceprovider.jar, /usr/lpp/java/J5.0_64/lib/ext/ibmjzos.jar, /usr/lpp/java/J5.0_64/lib/ext/ibmkeycert.jar, /usr/lpp/java/J5.0_64/lib/ext/ibmpkcs11impl.jar, /usr/lpp/java/J5.0_64/lib/ext/ibmsaslprovider.jar, /usr/lpp/java/J5.0_64/lib/ext/indicim.jar, /usr/lpp/java/J5.0_64/lib/ext/jaccess.jar, /usr/lpp/java/J5.0_64/lib/ext/jdmpview.jar, /usr/lpp/java/J5.0_64/lib/ext/jzosekm.jar, /usr/lpp/java/J5.0_64/lib/ext/recjava.jar, /usr/lpp/java/J5.0_64/lib/ext/recordio.jar, /usr/lpp/java/J5.0_64/lib/ext/zosrrs.jar, /usr/lpp/java/J5.0_64/lib/ext/CmpCrmf.jar, /usr/lpp/java/J5.0_64/lib/ext/IBMKeyManagementServer.jar, /usr/lpp/java/J5.0_64/lib/ext/JavaDiagnosticsCollector.jar, /usr/lpp/java/J5.0_64/lib/NetRexxC.jar, /usr/lpp/java/J5.0_64/lib/tools.jar]]
[loading /usr/lpp/java/J5.0_64/lib/vm.jar(java/lang/Object.class)]
[loading /usr/lpp/java/J5.0_64/lib/vm.jar(java/lang/String.class)]
[checking Jhello]
[loading /usr/lpp/java/J5.0_64/lib/vm.jar(java/lang/System.class)]
[loading /usr/lpp/java/J5.0_64/lib/core.jar(java/io/PrintStream.class)]
[loading /usr/lpp/java/J5.0_64/lib/core.jar(java/io/FilterOutputStream.class)]
[loading /usr/lpp/java/J5.0_64/lib/core.jar(java/io/OutputStream.class)]
[wrote Jhello.class]
[total 3767ms]
CP1ZA /u/a00002t % java Jhello

Hello world!


Kenneth Klein
Systems Specialist
502-868-3644
859-750-5179 (Cell)
502-868-2298 (Fax)
[hidden email]



Alan Sampson <[hidden email]>
Sent by: [hidden email]

06/18/2010 02:53 PM

Please respond to
IBM Netrexx <[hidden email]>

To
IBM Netrexx <[hidden email]>
cc
Subject
Re: [Ibm-netrexx] newbee still struggling







On 18 June 2010 10:34, <kenneth.klein@...> wrote:

Alan


Thanks loads. It's working, well, working better. At least I found the netrexx jar file. Next hurdle: Where do I find this java.lang.Object and how do I point java to it?


 CP1ZA /u/a00002t % echo $PATH

/u/a00002t:/usr/local/bin:/bin:/usr/sbin:/usr/lpp/java/J5.0_64/bin

 CP1ZA /u/a00002t % echo $CLASSPATH

/usr/lpp/java/J5.0_64/lib/NetRexxC.jar:/usr/lpp/java/J5.0_64/lib/tools.jar

 CP1ZA /u/a00002t % ls

*                   Junetest            hfsstats            output.file         tandf.nrx

A00002T.CP1Y.HFS    NetRexxC.sh         mydf                output.txt          tandf.txt

CP1Y                awkdf               mysed               smprept.apr27.2010  temp

JRBADIR.HTM         awkls               nrc                 tandf.class


 CP1ZA /u/a00002t % nrc tandf.nrx

NetRexx portable processor, version 2.02
Copyright (c) IBM Corporation, 2001.  All rights reserved.

Program tandf.nrx [pass 2, over 3 clauses]

   +++ Error: The class 'java.lang.Object' cannot be found

Compilation of 'tandf.nrx' failed [one error]


Kenneth,

It's odd that Java can't find java.lang.Object as its the guts of Java.  Basically, as Java is a purely "object oriented" programming environment, just about everything is an instance of java.lang.Object.  (Some of the primitive data types like int, long, boolean etc. aren't but I think that's just confusing the issue.)

It's just possible that your Java isn't installed correctly, try this: create the following Jhello.java file and compile & run it:

~/tmp> cat Jhello.java


public class Jhello {


  public static void main(String[] args) {


    System.out.println();
    System.out.println("Hello world!");
    System.out.println();


    return;
  }
}


~/tmp> javac -g Jhello.java
~/tmp> java Jhello


Hello world!


If that works your Java compiler's correctly installed.

I think I've seen this problem before though.  I'll go look to see if I have any references to this in the mail archive.

Regards,
Alan.

--
Can't tweet, won't tweet!
_______________________________________________
Ibm-netrexx mailing list
[hidden email]



_______________________________________________
Ibm-netrexx mailing list
[hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: newbee still struggling

alansam
In reply to this post by kenner

 CP1ZA /u/a00002t % nrc tandf.nrx
NetRexx portable processor, version 2.02
Copyright (c) IBM Corporation, 2001.  All rights reserved.
Program tandf.nrx [pass 2, over 3 clauses]
   +++ Error: The class 'java.lang.Object' cannot be found
Compilation of 'tandf.nrx' failed [one error]


Kenneth,

You have a back-level version of NetRexx, the current version is 2.05.  You can find the latest download at: http://www-01.ibm.com/software/awdtools/netrexx/download.html.

Here's a sample compilation from my system using version 2.05:

~/tmp> nrc hello.nrx
NetRexx portable processor, version 2.05
Copyright (c) IBM Corporation, 2005.  All rights reserved.
Program hello.nrx
    function getGreeting
Compilation of 'hello.nrx' successful

compared to a one using version 2.02:

~/tmp> nrc hello.nrx
NetRexx portable processor, version 2.02
Copyright (c) IBM Corporation, 2001.  All rights reserved.
Program hello.nrx
   +++ Error: The class 'java.lang.Object' cannot be found
Compilation of 'hello.nrx' failed [one error]

Alan.

--
Can't tweet, won't tweet!

_______________________________________________
Ibm-netrexx mailing list
[hidden email]

Alan

--
Needs more cowbell.
Reply | Threaded
Open this post in threaded view
|

Re: newbee still struggling

alansam


On 18 June 2010 15:15, Alan Sampson <[hidden email]> wrote:


Kenneth,

You have a back-level version of NetRexx, the current version is 2.05.  You can find the latest download at: http://www-01.ibm.com/software/awdtools/netrexx/download.html.


Additionally; IIRC the reason NetRexx 2.02 fails this way as that at some point in its very long development, the Java language's run-time JAR file was renamed from rt.jar to vm.jar.  NetRexx 2.02 expects the Java run-time to be in rt.jar so it can't find Java.

You can overcome the problem you're seeing by taking a copy of vm.jar, renaming it to rt.jar and including it in your CLASSPATH environment string (although I don't recommend that).

Alan.

--
Can't tweet, won't tweet!

_______________________________________________
Ibm-netrexx mailing list
[hidden email]

Alan

--
Needs more cowbell.
Reply | Threaded
Open this post in threaded view
|

Re: newbee still struggling

alansam


On 18 June 2010 15:34, Alan Sampson <[hidden email]> wrote:

You can overcome the problem you're seeing by taking a copy of vm.jar, renaming it to rt.jar and including it in your CLASSPATH environment string (although I don't recommend that).


Just to be perfectly clear here: I'm not advocating this as a solution, just trying to explain what's going on and why you're seeing this error with NetRexx 2.02.  The correct action is to upgrade to NetRexx 2.05.

Alan.

--
Can't tweet, won't tweet!

_______________________________________________
Ibm-netrexx mailing list
[hidden email]

Alan

--
Needs more cowbell.
Reply | Threaded
Open this post in threaded view
|

Re: newbee still struggling

kenner

Joy, joy, joy, joy, joy, joy, joy, joy, joy, joy, joy, joy, joy, joy, joy, joy, joy, joy, joy, joy, joy, joy, joy, joy, joy, joy, joy, joy, joy, joy, joy, joy, joy, joy, joy, joy, joy, joy, joy, joy, joy, joy, joy, joy!

It works!!!

You lead me right up to the complete solution to the problem. Thank you very much.





Kenneth Klein

[hidden email]
_______________________________________________
Ibm-netrexx mailing list
[hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: newbee still struggling

Robert L Hamilton
How about posting the code that worked. . . .

bobh

On Tue, Jun 22, 2010 at 8:13 AM, <[hidden email]> wrote:

Joy, joy, joy, joy, joy, joy, joy, joy, joy, joy, joy, joy, joy, joy, joy, joy, joy, joy, joy, joy, joy, joy, joy, joy, joy, joy, joy, joy, joy, joy, joy, joy, joy, joy, joy, joy, joy, joy, joy, joy, joy, joy, joy, joy!

It works!!!

You lead me right up to the complete solution to the problem. Thank you very much.





Kenneth Klein

_______________________________________________
Ibm-netrexx mailing list
[hidden email]




_______________________________________________
Ibm-netrexx mailing list
[hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: newbee still struggling

kenner

The object here is to ask the true and false questions in random order and repeat any questions that were answered incorrectly till the answer is correct.


CP1ZA /u/a00002t % cat tandf.nrx
options verbose4 trace1 logo
trace off
class tandf
        properties static
        rightones = 0
        tot_qs = 0
        try_cnt = 0
        answer1 = String[5]
        question1 = String[5]
        ans_done = int[5]
method main(s=String[]) static
        say 'Executing the latest code on' date()
/* Open and check the files       */
        do
                inhandle=BufferedReader(InputStreamReader(FileInputStream('tandf.txt')))
                say 'Processing infile'
                catch e=IOException
                        say '# error opening file' e.getMessage
        end
        /* The processing loop to load our table from the txt file.               ***/
        loop sub = 1 by 1
                line = inhandle.readLine -- get next line Ýas Rexx string¨
                if line=null then leave sub  -- normal end of file
                parse line 'A).' answer_in 'Q).' question_in
                answer1[sub] = answer_in
                question1[sub] = question_in
                tot_qs = tot_qs + 1
        end sub
        say 'Total questions to be asked =' tot_qs
        /* The main processing loop.                     ***/
        loop label whileloop until rightones > tot_qs - 1
                I = GetRand()
                if ans_done[I] = 1 then iterate
                say question1[I]
                response1 = ask
                if response1 = answer1[I] then do
                        say "That is correct!"
                        rightones = rightones + 1
                        ans_done[I]= 1
                end
                else
                        say "That is wrong."
                try_cnt = try_cnt + 1
        end whileloop
        say rightones 'of' tot_qs 'correct.' try_cnt 'attempts.' 100 (rightones / try_cnt) %1 '%'
        return

method GetRand static returns int
        I = (4*Math.random() + 1) % 1  -- %1 make result to integer
        return I




 CP1ZA /u/a00002t % cat tandf.txt
A). T Q). It is important to smell the aroma of a sample as soon as it is poured.
A). F Q). The head judge has the sole responsibility to fill out the slight summary sheets.
A). F Q). The competition organizer may not judge beers even if he has no knowlege of competitor's entries.
A). T Q). Wooden pencils and erasors should be avoided to prevent introducing off aromas in the judging area.






 CP1ZA /u/a00002t % nrc tandf.nrx
NetRexx portable processor, version 2.05
Copyright (c) IBM Corporation, 2005.  All rights reserved.
  Loaded public class 'java.lang.Object'
Translating 'tandf.nrx' [Pass 1]
  === class tandf === [pass 1]
      Loaded public class 'netrexx.lang.Rexx'
      Loaded public final class 'java.lang.String'
    method main [line 11]
    method GetRand [line 48]
Program tandf.nrx [pass 2, over 55 clauses]
  === class tandf ===
    function main(String[])
      Loaded public class 'java.util.Date'
      Loaded public abstract interface class 'java.io.Serializable'
      Loaded public abstract interface class 'java.lang.Cloneable'
      Loaded public abstract interface class 'java.lang.Comparable'
      Loaded public abstract interface class 'netrexx.lang.RexxOperators'
      Loaded public abstract class 'java.io.InputStream'
      Loaded public class 'java.io.FileInputStream'
      Loaded public class 'java.lang.Throwable'
      Loaded public class 'java.lang.Exception'
      Loaded public class 'java.io.IOException'
      Loaded public class 'java.io.FileNotFoundException'
      Loaded public class 'java.lang.RuntimeException'
      Loaded public class 'java.lang.Error'
      Loaded public abstract class 'java.io.Reader'
      Loaded public class 'java.io.InputStreamReader'
      Loaded public class 'java.io.BufferedReader'
      signals IOException
    function GetRand
      Loaded public final class 'java.lang.Math'
Compiling: '-nowarn -classpath /u/a00002t:/usr/lpp/java/J5.0_64/lib/NetRexxC.jar:/usr/lpp/java/J5.0_64/lib/tools.jar:/usr/lpp/java/J5.0_64/lib/charsets.jar:/usr/lpp/java/J5.0_64/lib/core.jar:/usr/lpp/java/J5.0_64/lib/graphics.jar:/usr/lpp/java/J5.0_64/lib/ibmcertpathprovider.jar:/usr/lpp/java/J5.0_64/lib/ibmcfw.jar:/usr/lpp/java/J5.0_64/lib/ibmjcefw.jar:/usr/lpp/java/J5.0_64/lib/ibmjgssprovider.jar:/usr/lpp/java/J5.0_64/lib/ibmjsseprovider2.jar:/usr/lpp/java/J5.0_64/lib/ibmorb.jar:/usr/lpp/java/J5.0_64/lib/ibmorbapi.jar:/usr/lpp/java/J5.0_64/lib/ibmpkcs.jar:/usr/lpp/java/J5.0_64/lib/security.jar:/usr/lpp/java/J5.0_64/lib/server.jar:/usr/lpp/java/J5.0_64/lib/vm.jar:/usr/lpp/java/J5.0_64/lib/xml.jar:/usr/lpp/java/J5.0_64/lib/BD.jar:/usr/lpp/java/J5.0_64/lib/ext/dtfj.jar:/usr/lpp/java/J5.0_64/lib/ext/dtfj-interface.jar:/usr/lpp/java/J5.0_64/lib/ext/gskikm.jar:/usr/lpp/java/J5.0_64/lib/ext/healthcenter.jar:/usr/lpp/java/J5.0_64/lib/ext/ibmcmsprovider.jar:/usr/lpp/java/J5.0_64/lib/ext/ibmjcecca.jar:/usr/lpp/java/J5.0_64/lib/ext/ibmjcefips.jar:/usr/lpp/java/J5.0_64/lib/ext/ibmjceprovider.jar:/usr/lpp/java/J5.0_64/lib/ext/ibmjzos.jar:/usr/lpp/java/J5.0_64/lib/ext/ibmkeycert.jar:/usr/lpp/java/J5.0_64/lib/ext/ibmpkcs11impl.jar:/usr/lpp/java/J5.0_64/lib/ext/ibmsaslprovider.jar:/usr/lpp/java/J5.0_64/lib/ext/indicim.jar:/usr/lpp/java/J5.0_64/lib/ext/jaccess.jar:/usr/lpp/java/J5.0_64/lib/ext/jdmpview.jar:/usr/lpp/java/J5.0_64/lib/ext/jzosekm.jar:/usr/lpp/java/J5.0_64/lib/ext/recjava.jar:/usr/lpp/java/J5.0_64/lib/ext/recordio.jar:/usr/lpp/java/J5.0_64/lib/ext/zosrrs.jar:/usr/lpp/java/J5.0_64/lib/ext/CmpCrmf.jar:/usr/lpp/java/J5.0_64/lib/ext/IBMKeyManagementServer.jar:/usr/lpp/java/J5.0_64/lib/ext/JavaDiagnosticsCollector.jar /u/a00002t/tandf.java'
Compilation of 'tandf.nrx' successful
 CP1ZA /u/a00002t %

Executing the latest code on Tue Jun 22 14:08:59 UTC 2010
Processing infile
Total questions to be asked = 4
 It is important to smell the aroma of a sample as soon as it is poured.
f
That is wrong.
 The head judge has the sole responsibility to fill out the slight summary sheets.
f
That is correct!
 The competition organizer may not judge beers even if he has no knowlege of competitor's entries.
f
That is correct!
 Wooden pencils and erasors should be avoided to prevent introducing off aromas in the judging area.
f
That is wrong.
 Wooden pencils and erasors should be avoided to prevent introducing off aromas in the judging area.
t
That is correct!
 It is important to smell the aroma of a sample as soon as it is poured.
t
That is correct!
4 of 4 correct. 6 attempts. 100 0 %


_______________________________________________
Ibm-netrexx mailing list
[hidden email]