In compiling and running a Pipelines stage test for NetRexx 4.01 beta, I get this error message:
In researching this I find two possible fixes:
My first impulse was go for #1. But then I thought, this is for "publication" and needs to run on all versions that NetRexx supports, therefore I should do #2. What is the "right" thing to do here? Thanks for your thoughts and input. Jeff _______________________________________________ Ibm-netrexx mailing list [hidden email] Online Archive : http://ibm-netrexx.215625.n3.nabble.com/ |
Hi Jeff,
while NetRexx 3.09 needs Java class version 50, provided by Java 1.6, NetRexx 4.01 requires a minimum Java class version of 51 ( Java 1.7 and above). This is because we need the java.nio package URI scheme to read the jrt: JPMS. Java class version 59.0 is delivered with Java 15. The updated build.xml specifies <property name="ant.netrexxc.target" value="1.7"/> The generated NetRexx class/jar files should be Java 1.7 and above compatible, no matter which javac/ecj version was used to build them.. From the error, it seems you are using Java 8 as runtime (up to 52.0). Not sure which NetRexx version you are using. Can you check out branch v4.01-beta3 and rebuild? ./build.sh clean ./build.sh (build with ecj) or ./build.sh withjavac (build with javac). The newly generated NetRexxC/R jar files in build/lib should be on the classpath. I'm testing with Java 8, 11 and 15, all OpenJDK on Linux. Never played with njpipes however.. Marc On 12/28/20 9:25 PM, Jeff Hennick wrote: > In compiling and running a Pipelines stage test for NetRexx 4.01 beta, I get this error message: > >> PS C:\Users\Jeff\documents\work> java chop_tests1 >> Error: A JNI error has occurred, please check your installation and try again >> Exception in thread "main" java.lang.UnsupportedClassVersionError: >> chop_tests1 has been compiled by a more recent version of the Java >> Runtime (class file version 59.0), this version of the Java Runtime only >> recognizes class file versions up to 52.0 > > In researching this I find two possible fixes: > > 1. Get a more recent version of Java RTE > 2. Compile the code for an earlier version of Java > > My first impulse was go for #1. But then I thought, this is for "publication" and needs to run on all versions that > NetRexx supports, therefore I should do #2. > > What is the "right" thing to do here? > > Thanks for your thoughts and input. > > Jeff > > > _______________________________________________ > Ibm-netrexx mailing list > [hidden email] > Online Archive : http://ibm-netrexx.215625.n3.nabble.com/ > _______________________________________________ Ibm-netrexx mailing list [hidden email] Online Archive : http://ibm-netrexx.215625.n3.nabble.com/ OpenPGP_signature (505 bytes) Download Attachment |
[Oops, first time I sent this to the ns2 address.] Marc, Thank you for all you do for NetRexx and for the reply. I am still having the problem. I am running the most recent Java RTE: "1.8.0_271" build b09.
(Removed, downloaded, and reinstalled today.) I have been using the most recent NetRexx 4.01 from git pull origin master. I have just downloaded the v4.01-beta3, and changed all the environment variables to point to that. Then restarted the terminal to use these. I am using the ecj compiler, at least I thought I was. But I see
the v4.01-beta3 does NOT include either the ecj-4.6.3.jar or
NetRexxF.jar. (The master branch does include these.) So I have
no idea where it is now getting a compiler from. Same results. "chop_tests1 has been compiled by a more recent
version of the Java Runtime (class file version 59.0), this
version of the Java Runtime only recognizes class file versions up
to 52.0." Pipelines, chop_tests1.njp, and the called chop.nrx, are all just pure NetRexx. Jeff On 12/29/2020 5:40 AM, Marc Remes
wrote:
Hi Jeff, _______________________________________________ Ibm-netrexx mailing list [hidden email] Online Archive : http://ibm-netrexx.215625.n3.nabble.com/ |
That would be a packaging error. But it is not:
-rw-r--r-- 4065998 25-Dec-2020 23:46:42 lib/NetRexxF.jar -rw-r--r-- 2166096 25-Dec-2020 23:46:42 lib/ecj-I20201218-1800-NRX.jar I just downloaded and checked. The ecj jar is renamed; all classes are also in NetRexxF.jar. If you build from source then you don’t need the package. NetRexxF.jar will be in build/lib Make sure to empty out build/classes before building. You can rm -rf build. best regards, René
_______________________________________________ Ibm-netrexx mailing list [hidden email] Online Archive : http://ibm-netrexx.215625.n3.nabble.com/ |
I've got something really messed up. I have never done a manual build from source, just used the code and jars, as it comes from sourceforge. Now, NetRexx by itself is showing the problem. PS C:\Users\Jeff\documents\work> type hello.nrxThat works. Now to do it in two steps, create a class file and then run it.
I get similar errors with any class file that I create.
On 12/31/2020 12:45 PM, René Jansen
wrote:
That would be a packaging error. But it is not: _______________________________________________ Ibm-netrexx mailing list [hidden email] Online Archive : http://ibm-netrexx.215625.n3.nabble.com/ |
I got the same error with my nrx code, compile fine with 4.01 but run gives
the same error as below (I only downloaded the Beta3 build, not building my own jars) C:\ >javac -version javac 1.8.0_202 C:\ >java -version java version "1.8.0_202" Java(TM) SE Runtime Environment (build 1.8.0_202-b08) Java HotSpot(TM) Client VM (build 25.202-b08, mixed mode) Error: A JNI error has occurred, please check your installation and try again Exception in thread "main" java.lang.UnsupportedClassVersionError: classxyz has been compiled by a more recent version of the Java Runtime (class file version 59.0), this version of the Java Runtime only recognizes class file versions up to 52.0 -- Sent from: https://urldefense.proofpoint.com/v2/url?u=http-3A__ibm-2Dnetrexx.215625.n3.nabble.com_&d=DwICAg&c=jf_iaSHvJObTbx-siA1ZOg&r=_6rXNpPJ1fYV-3bV1za02NiR4PUelvicfHXwtnTXpXE&m=Griek4GBHVcGUqxdZbLrw0GLoUV4vMUo7ep6yjmyWaw&s=aKmgs22h7CqUri5E9sdeExIdyyneC3ltjwX1W7nHx8s&e= _______________________________________________ Ibm-netrexx mailing list [hidden email] Online Archive : http://ibm-netrexx.215625.n3.nabble.com/ |
Michael, Thank you for confirming. Jeff On 1/1/2021 5:20 AM,...
Michael, Thank you for confirming. Jeff On 1/1/2021 5:20 AM, Michael
(maillists) Dag wrote:
I got the same error with my nrx code, compile fine with 4.01 but run gives the same error as below (I only downloaded the Beta3 build, not building my own jars) C:\ >javac -version javac 1.8.0_202 C:\ >java -version java version "1.8.0_202" Java(TM) SE Runtime Environment (build 1.8.0_202-b08) Java HotSpot(TM) Client VM (build 25.202-b08, mixed mode) Error: A JNI error has occurred, please check your installation and try again Exception in thread "main" java.lang.UnsupportedClassVersionError: classxyz has been compiled by a more recent version of the Java Runtime (class file version 59.0), this version of the Java Runtime only recognizes class file versions up to 52.0 -- Sent from: https://urldefense.proofpoint.com/v2/url?u=http-3A__ibm-2Dnetrexx.215625.n3.nabble.com_&d=DwICAg&c=jf_iaSHvJObTbx-siA1ZOg&r=_6rXNpPJ1fYV-3bV1za02NiR4PUelvicfHXwtnTXpXE&m=Griek4GBHVcGUqxdZbLrw0GLoUV4vMUo7ep6yjmyWaw&s=aKmgs22h7CqUri5E9sdeExIdyyneC3ltjwX1W7nHx8s&e= _______________________________________________ Ibm-netrexx mailing list [hidden email] Online Archive : http://ibm-netrexx.215625.n3.nabble.com/ _______________________________________________ Ibm-netrexx mailing list [hidden email] Online Archive : http://ibm-netrexx.215625.n3.nabble.com/ |
Jeff, Michael, the eclipse batch compiler indeed creates version 59.0 class files. We need to look into this. In the meanwhile, compile with nrc -javac, this requires the JDK installed which is something we want to avoid. Make sure JRE is at same level as JDK. Marc On 1/1/21 12:59 PM, Jeff Hennick wrote: > Michael, > > Thank you for confirming. > > Jeff > > On 1/1/2021 5:20 AM, Michael (maillists) Dag wrote: >> I got the same error with my nrx code, compile fine with 4.01 but run gives >> the same error as below >> (I only downloaded the Beta3 build, not building my own jars) >> >> C:\ >javac -version >> javac 1.8.0_202 >> >> C:\ >java -version >> java version "1.8.0_202" >> Java(TM) SE Runtime Environment (build 1.8.0_202-b08) Java HotSpot(TM) >> Client VM (build 25.202-b08, mixed mode) >> >> Error: A JNI error has occurred, please check your installation and try >> again Exception in thread "main" java.lang.UnsupportedClassVersionError: >> classxyz has been compiled by a more recent version of the Java Runtime >> (class file version 59.0), this version of the Java Runtime only recognizes >> class file versions up to 52.0 >> >> >> >> >> -- >> Sent from:https://urldefense.proofpoint.com/v2/url?u=http-3A__ibm-2Dnetrexx.215625.n3.nabble.com_&d=DwICAg&c=jf_iaSHvJObTbx-siA1ZOg&r=_6rXNpPJ1fYV-3bV1za02NiR4PUelvicfHXwtnTXpXE&m=Griek4GBHVcGUqxdZbLrw0GLoUV4vMUo7ep6yjmyWaw&s=aKmgs22h7CqUri5E9sdeExIdyyneC3ltjwX1W7nHx8s&e= >> _______________________________________________ >> Ibm-netrexx mailing list >> [hidden email] >> Online Archive :http://ibm-netrexx.215625.n3.nabble.com/ >> > > _______________________________________________ > Ibm-netrexx mailing list > [hidden email] > Online Archive : http://ibm-netrexx.215625.n3.nabble.com/ > _______________________________________________ Ibm-netrexx mailing list [hidden email] Online Archive : http://ibm-netrexx.215625.n3.nabble.com/ OpenPGP_signature (505 bytes) Download Attachment |
nrc -javac indeed does the trick!
C:\Users\Michael>java -version java version "1.8.0_05" Java(TM) SE Runtime Environment (build 1.8.0_05-b13) Java HotSpot(TM) 64-Bit Server VM (build 25.5-b02, mixed mode) C:\Users\Michael>javac -version javac 1.8.0_05 C:\Users\Michael>nrc -javac mqqutilputx java -cp "C:\IBMMQ92\java\lib\com.ibm.mq.jmqi.jar;C:\IBMMQ92\java\lib\com.ibm.mq.jar;.;C:\NetRexx\4.0.1\lib\NetRexxC.jar;c:\java\jdk1.8.0_05\lib\Tools.jar;C:\IBMMQ92\java\lib\com.ibm.mqjms.jar;C:\IBMMQ92\java\lib\com.ibm.mq.jar;;C:\NetRexx\4.0.1\lib\NetRexxF.jar;." -Dnrx.compiler=ecj org.netrexx.process.NetRexxC -javac mqqutilputx NetRexx portable processor 4.01-beta3 build 371-20201225-2341 Copyright (c) RexxLA, 2011,2020. All rights reserved. Parts Copyright (c) IBM Corporation, 1995,2008. Program mqqutilputx.nrx === class mqqutilputx === function main(String[]) signals InterruptedException,IOException function MainProcess function connect_to_qmgr function dumpHexId(byte[]) function ReadFile(Rexx) Compilation of 'mqqutilputx.nrx' successful 02-01-2021 12:12 16.628 mqqutilputx.class and runs fine now with java mqqutilputx ... Whereas the class that did not work without -javac: 16.675 mqqutilputx.class Michael @ MQSystems -----Original Message----- From: Ibm-netrexx <[hidden email]> On Behalf Of Marc Remes Sent: vrijdag 1 januari 2021 17:36 To: IBM Netrexx <[hidden email]> Subject: Re: [Ibm-netrexx] NetRexx 4.01 beta Jeff, Michael, the eclipse batch compiler indeed creates version 59.0 class files. We need to look into this. In the meanwhile, compile with nrc -javac, this requires the JDK installed which is something we want to avoid. Make sure JRE is at same level as JDK. Marc On 1/1/21 12:59 PM, Jeff Hennick wrote: > Michael, > > Thank you for confirming. > > Jeff > > On 1/1/2021 5:20 AM, Michael (maillists) Dag wrote: >> I got the same error with my nrx code, compile fine with 4.01 but run >> gives the same error as below (I only downloaded the Beta3 build, not >> building my own jars) >> >> C:\ >javac -version >> javac 1.8.0_202 >> >> C:\ >java -version >> java version "1.8.0_202" >> Java(TM) SE Runtime Environment (build 1.8.0_202-b08) Java >> HotSpot(TM) Client VM (build 25.202-b08, mixed mode) >> >> Error: A JNI error has occurred, please check your installation and >> try again Exception in thread "main" java.lang.UnsupportedClassVersionError: >> classxyz has been compiled by a more recent version of the Java >> Runtime (class file version 59.0), this version of the Java Runtime >> only recognizes class file versions up to 52.0 >> >> >> >> >> -- >> Sent >> from:https://urldefense.proofpoint.com/v2/url?u=http-3A__ibm-2Dnetrex >> x.215625.n3.nabble.com_&d=DwICAg&c=jf_iaSHvJObTbx-siA1ZOg&r=_6rXNpPJ1 >> fYV-3bV1za02NiR4PUelvicfHXwtnTXpXE&m=Griek4GBHVcGUqxdZbLrw0GLoUV4vMUo >> 7ep6yjmyWaw&s=aKmgs22h7CqUri5E9sdeExIdyyneC3ltjwX1W7nHx8s&e= >> _______________________________________________ >> Ibm-netrexx mailing list >> [hidden email] >> Online Archive :https://urldefense.proofpoint.com/v2/url?u=http-3A__ibm-2Dnetrexx.215625.n3.nabble.com_&d=DwIFaQ&c=jf_iaSHvJObTbx-siA1ZOg&r=_6rXNpPJ1fYV-3bV1za02NiR4PUelvicfHXwtnTXpXE&m=flnwfgW5XKzd8aD19v9_DgO9zKz7WpoppN3o7MJNWG4&s=J1HbYGW99IVXdOm0NgTbRlPV7G81Y3vrimIrGct9LbE&e= >> > > _______________________________________________ > Ibm-netrexx mailing list > [hidden email] > Online Archive : https://urldefense.proofpoint.com/v2/url?u=http-3A__ibm-2Dnetrexx.215625.n3.nabble.com_&d=DwIFaQ&c=jf_iaSHvJObTbx-siA1ZOg&r=_6rXNpPJ1fYV-3bV1za02NiR4PUelvicfHXwtnTXpXE&m=flnwfgW5XKzd8aD19v9_DgO9zKz7WpoppN3o7MJNWG4&s=J1HbYGW99IVXdOm0NgTbRlPV7G81Y3vrimIrGct9LbE&e= > _______________________________________________ Ibm-netrexx mailing list [hidden email] Online Archive : http://ibm-netrexx.215625.n3.nabble.com/ |
Free forum by Nabble | Edit this page |