Can't get compiled jython to work...

kramer31 kramer.newsreader at gmail.com
Fri Dec 14 16:51:07 EST 2007


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.

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