jython and java application

ShoqulKutlu kursat.kutlu at gmail.com
Wed Nov 25 20:54:23 EST 2009


I don't know if it's right place but normally main method requires an
args even it is not needed to supply from commandline. Maybe this is a
jython runtime error and requires at least an empty argument. You
could try to pass and empty string array like ['']. I'm not using
jython please use your own notation.

Regards,
Kutlu

On Nov 26, 3:30 am, KB <ke... at nekotaku.com> wrote:
> Hi there,
>
> Apologies if this is on the wrong group, this is a jython question.
> Please redirect me to the correct group if this is in error.
>
> I have a java application that takes no arguements. When I run it, it
> spits out output, and finishes.
>
> I am trying to run this java application from jython 2.5.1, JRE6.
>
> I have made simple "Hello World" java classes be callable from a
> simple jython script, yet I am stumbling on the java main construct in
> the application.
>
> print krbtest.SimpleHistoricTutorial().main() obviously gives me an
> args error (expected 1, got 0) as the definition in the java
> application is:
>
> public static void main(String[] args)
>
> The jython code is as follows:
> import krbtest
>
> # was messing with this to pass a java formatted string but to no
> avail
>
> from java.lang import String
>
> print krbtest.SimpleHistoricTutorial().main()
>
> #####
>
> Any advice greatly appreciated! Especially with how to call "main()"
> with arguments from jython.
>
> Apologies in advance again if this is the wrong group.




More information about the Python-list mailing list