Fwd: NetRexx 4.01 beta

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

Fwd: NetRexx 4.01 beta

rvjansen
here is one from last year. It is very annoying that someone at aibm borked the mailing list. It went to IBM Brazil but I don’t have any contact there.

Begin forwarded message:

From: René Jansen <[hidden email]>
Subject: Re: [Ibm-netrexx] NetRexx 4.01 beta
Date: 29 December 2020 at 12:12:13 CET
To: IBM Netrexx <[hidden email]>

Hi Jeff and Marc,

4.01 beta3 was built with JDK8.

You can look at the class level with this utility:

class VersionTest
  method testVersionSpecialVariable()
    
  method testMinimalJVMLevel()
    -- Oracle's Java Virtual Machine implementation in JDK release 1.0.2 supports class file
    -- format versions 45.0 through 45.3 inclusive. JDK releases 1.1.* support class file format
    -- versions in the range 45.0 through 45.65535 inclusive. For k . 2, JDK release 1.k supports
    -- class file format versions in the range 45.0 through 44+k.0 inclusive.
    
    data = DataInputStream(FileInputStream("../../build/classes/org/netrexx/njpipes/pipes/compiler.class"))
    signature = ''
    loop for 4
      signature = signature||Rexx(data.readUnsignedByte()).d2x
    end
    
    minor= data.readUnsignedShort()
    major= data.readUnsignedShort()
    say major'.'minor 'corresponding to a minimal JVM level of 1.'||major-44
    data.close()

  method main(args=String[]) static
    v=VersionTest()
    v.testMinimalJVMLevel()

I am not sure with which JDK I should build 4.01; would a higher one be better to avoid problems in the field?

René


On 29 Dec 2020, at 11:40, Marc Remes <[hidden email]> wrote:

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/




_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/

Reply | Threaded
Open this post in threaded view
|

Re: Fwd: NetRexx 4.01 beta

Marc Remes-2
Hi René,

as I understand, it does not matter with which JDK NetRexxC/F.jar is built.
NetRexxC built with JDK8, 11 or 15 compiles and interprets fine on Java 1.8, 11 and 15.
ant.netrexxc.source and .target in build.xml is set to "1.7" - we do need java.nio.
The NetRexxC generated class files are dependent on the javac version.

The ecj class files in NetRexxF.jar need to be built with JDK15, but we force the Eclipse Compiler to output '51.0
corresponding to a minimal JVM level of 1.7' class files.

I have not tested with Java 1.7 (out of regular support) and wonder if we should consider 1.7.

Marc


On 1/3/21 1:55 PM, René Jansen wrote:

> here is one from last year. It is very annoying that someone at...
> This Message Is From an External Sender
> This message came from outside your organization.
>
> here is one from last year. It is very annoying that someone at aibm borked the mailing list. It went to IBM Brazil but
> I don’t have any contact there.
>
>> Begin forwarded message:
>>
>> *From: *René Jansen <[hidden email] <mailto:[hidden email]>>
>> *Subject: **Re: [Ibm-netrexx] NetRexx 4.01 beta*
>> *Date: *29 December 2020 at 12:12:13 CET
>> *To: *IBM Netrexx <[hidden email] <mailto:[hidden email]>>
>>
>> Hi Jeff and Marc,
>>
>> 4.01 beta3 was built with JDK8.
>>
>> You can look at the class level with this utility:
>>
>> class VersionTest
>>   method testVersionSpecialVariable()
>>   method testMinimalJVMLevel()
>>     -- Oracle's Java Virtual Machine implementation in JDK release 1.0.2 supports class file
>>     -- format versions 45.0 through 45.3 inclusive. JDK releases 1.1.* support class file format
>>     -- versions in the range 45.0 through 45.65535 inclusive. For k . 2, JDK release 1.k supports
>>     -- class file format versions in the range 45.0 through 44+k.0 inclusive.
>>     data = DataInputStream(FileInputStream("../../build/classes/org/netrexx/njpipes/pipes/compiler.class"))
>>     signature = ''
>>     loop for 4
>>       signature = signature||Rexx(data.readUnsignedByte()).d2x
>>     end
>>     minor= data.readUnsignedShort()
>>     major= data.readUnsignedShort()
>>     say major'.'minor 'corresponding to a minimal JVM level of 1.'||major-44
>>     data.close()
>>
>>   method main(args=String[]) static
>>     v=VersionTest()
>>     v.testMinimalJVMLevel()
>>
>> I am not sure with which JDK I should build 4.01; would a higher one be better to avoid problems in the field?
>>
>> René
>>
>>
>>> On 29 Dec 2020, at 11:40, Marc Remes <[hidden email] <mailto:[hidden email]>> wrote:
>>>
>>> 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] <mailto:[hidden email]>
>>>> Online Archive : http://ibm-netrexx.215625.n3.nabble.com/ 
>>>> <https://urldefense.proofpoint.com/v2/url?u=http-3A__ibm-2Dnetrexx.215625.n3.nabble.com_&d=DwMFaQ&c=jf_iaSHvJObTbx-siA1ZOg&r=_6rXNpPJ1fYV-3bV1za02NiR4PUelvicfHXwtnTXpXE&m=nyqhjLLsQco_gOKXKQm0HzI6JeJNl_LOE1wqsFgePWw&s=FY3dEyvm2PcdyXRGSWRCxi3O5YjoLcW0G91bhJMsYqA&e=>
>>>
>>> _______________________________________________
>>> Ibm-netrexx mailing list
>>> [hidden email] <mailto:[hidden email]>
>>> Online Archive : http://ibm-netrexx.215625.n3.nabble.com/ 
>>> <https://urldefense.proofpoint.com/v2/url?u=http-3A__ibm-2Dnetrexx.215625.n3.nabble.com_&d=DwMFaQ&c=jf_iaSHvJObTbx-siA1ZOg&r=_6rXNpPJ1fYV-3bV1za02NiR4PUelvicfHXwtnTXpXE&m=nyqhjLLsQco_gOKXKQm0HzI6JeJNl_LOE1wqsFgePWw&s=FY3dEyvm2PcdyXRGSWRCxi3O5YjoLcW0G91bhJMsYqA&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/


OpenPGP_signature (505 bytes) Download Attachment