so this should work for you:

➜  test git:(master) ✗ cat hello.nrx
import java.lang.String

say 'hello java' System.getProperty("java.version")

loop i=long 0 to 10
        hello(i)
end

loop i=long 0 to 10
        hello(java.lang.String(i))
end

method hello(j)
  say "hello" j

  method hello(j=long)
    say "hello long" j

  method hello(j=java.lang.String)
    say "hello String" j
➜  test git:(master) ✗ unset CLASSPATH
➜  test git:(master) ✗ echo $CLASSPATH

➜  test git:(master) ✗ java -jar NetRexxC.jar hello
NetRexx portable processor 4.05-beta build 374-20230213-1052
Copyright (c) RexxLA, 2011,2023.   All rights reserved.
Parts Copyright (c) IBM Corporation, 1995,2008.
Program hello.nrx
    constructor hello(Rexx)
    constructor hello(long)
    constructor hello(String)
Compilation of 'hello.nrx' successful
➜  test git:(master) ✗

I have a global CLASSPATH, and only for specific projects I have a -cp on the 
command line for Make or Ninja, to have control over versions and libraries.
A global classpath enables me to check if all code is still compatible with the 
combination of releases from different libraries I use.
But as you see it is not really needed. We are not mandating anything, and if 
you want to run from a jar, that is fine.

best regards,

René.

> On 1 Mar 2023, at 17:23, David Crayford <dcrayf...@gmail.com> wrote:
> 
> On 2/3/23 00:20, René Jansen wrote:
>> Well, it *is* an executable jar. Up to you.
> 
> Executable Jars don't require setting a CLASSPATH Rene
> 
> 
>> 
>>> On 1 Mar 2023, at 17:17, David Crayford <dcrayf...@gmail.com> wrote:
>>> 
>>> Why doesn't it just use an executable jar and use "-jar"?
>> 
>> ----------------------------------------------------------------------
>> For IBM-MAIN subscribe / signoff / archive access instructions,
>> send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
> 
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to