Can't get compiled jython to work...

kyosohma at gmail.com kyosohma at gmail.com
Fri Dec 14 17:04:58 EST 2007


On Dec 14, 3:51 pm, kramer31 <kramer.newsrea... at gmail.com> wrote:
> Hi.  First, I'm not sure if this is the correct group, but becuase I
> couldn't find a jython newsgroup, I'll post here.


If you go to the main jython site at www.jython.com, you will notice a
link on the left under the "Community" header that is titled "Mailing
Lists".

I've never used Jython, so hopefully they can help you...or maybe one
of the Jython moguls here will lend you some advice.

Mike


>
> I'm new to jython and am just trying to get it to work.  Interpreted
> jython works just fine, but I still can't get my compiled jython to
> work.
>
> When I do this:
>
> jythonc fac.py (where fac.py is a jython program), it creates a
> jpywork directory with three files fac.java, fac.class, and fac
> $_PyInner.class
>
> But if I cd to that directory and do this:
>
> java -classpath $JYTHON_HOME/jython.jar fac
>
> I get this error:
>
> Exception in thread "main" java.lang.NoClassDefFoundError: fac
>
> My fac.py looks like this:
>
> def fac(x):
>         if x <= 1: return 1
>         return long(x) * fac(x-1)
>
> if __name__ == "__main__":
>         print 1 + 2
>         print "Hello" + "Goodbye"
>         print "fac(3): "
>         print fac(3)
>         print "fac(100): "
>         print fac(100)




More information about the Python-list mailing list