Re: [Jython-users] How to invoked a class main method ...
by Thomas SMETS other posts by this author
Dec 9 2004 3:12PM messages near this date
Re: [Jython-users] Java classes with dynamic properties
|
[Jython-users] How to invoked a class main method ...
--- Kent Johnson <kent37@[...].net> wrote:
> Thomas SMETS wrote:
> >
> > I wandered How I could invoked my Main-class :
> > public static void main(String[] args)
> > from Jython...
>
> To invoke main() in class MyClass I think this will work:
> import MyClass
> MyClass.main()
>
> >
> > In the same idea, I have method that accepts an Object[] (array of Objects).
> > How do I invoke it from Jython... I tried a List ... Unsuccessfully !
>
> If lst is the list you want to pass, you can use jarray to convert it to an array of Objec
ts:
> import java, jarray
> oLst = jarray.array(lst, java.lang.Object)
>
Does this means there is some sort of a "Casting" to pass arguments from Jython to Java ...
?
>
> Kent
>
> >
> > Any hint would be appreciated.
> >
> > \T,
> >
> > =====
> > Anyone can write software a computer understands;
> > let's write software that people understand.
> > K. Beck
> > T. : +32 (0)2 742 05 94
> > M. : +32 (0)497 44 68 12
> >
> >
=====
Anyone can write software a computer understands;
let's write software that people understand.
K. Beck
T. : +32 (0)2 742 05 94
M. : +32 (0)497 44 68 12
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/
_______________________________________________
Jython-users mailing list
Jython-users@[...].net
https://lists.sourceforge.net/lists/listinfo/jython-users
|