1) In the main/parent program, do a PUTENV('CLASSPATH=whatever') then
EXECUTE @IM:'k':program_that_does_CALLJ

2) Think 'multi-value': pass the arguments as a dynamic array.

On Thu, Jun 23, 2016 at 4:19 AM, JOSE L MARTINEZ-AVIAL <[email protected]>
wrote:

> Hello,
>     I'm using jbase 5.11, and I'm trying to use CALLJ for Java routines.
> I've been able to call a simple routine as follows:
>
> // PickBasic
>     CALLJ "mytestclass", "$mystaticmethod2", 'TONY' SETTING ret ON ERROR
>         err = SYSTEM(0)
>         DISPLAY "ERROR ":err
>     END
>     DISPLAY ret
>
>  // Java
>     public static String mystaticmethod2(String s) {
>         System.out.println("mystaticmethod2 ");
>         return "test";
>     }
>
> but I have two issues I would like to address:
>
>   1) The classpath needs to be defined before starting jbase. If I set it
> or change it during the jbase session, it has no effect. Is there any way I
> do this? Ideally I would like to set the classpath just before calling
> CALLJ.
>
>   2) The only arguments/return objects possible seem to be String. Is
> there any way to pass multiple arguments, or an array of Strings? Is there
> any way it can return something an array of Strings, mapped to a dynamic
> array, or similar?
>
>
> Thanks
> JL
>
> --
> --
> IMPORTANT: T24/Globus posts are no longer accepted on this forum.
>
> To post, send email to [email protected]
> To unsubscribe, send email to [email protected]
> For more options, visit this group at
> http://groups.google.com/group/jBASE?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups
> "jBASE" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
IMPORTANT: T24/Globus posts are no longer accepted on this forum.

To post, send email to [email protected]
To unsubscribe, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/jBASE?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"jBASE" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to