Two Jython Questions

Maan Hamze mmhamze at pleiades.net
Fri Aug 31 01:37:34 EDT 2001


Thank you all for the replies.  But I am dumpfounded (or is dumbfounded?)
Again it quit working and apparently it can not find the CLASSPATH.  The
CLASSPATH is in the environment.  But I can see clearly that it just is not
picking the path.  And for some reason Jython likes to use one particular
JAVA.exe that came with the Java runtime for quicktime.
This is simply confusing.  I'll just sleep on it and deal with it again this
weekend.  Things have a way of working themselves out.  I can see the power
of Jython.  Only if this mess of  classpaths is worked out.  But also maybe
Windows ME itself is the mess!
Maan

"Delaney, Timothy" <tdelaney at avaya.com> wrote in message
news:mailman.999218077.28034.python-list at python.org...
> > From: Maan M. Hamze [mailto:mmhamze at pleiades.net]
> > Mats
> > I figured out how to run things and how to set the path of classes.
> > However, I am still running into one problem.  I am compiling
> > a test.py file
> > into test.class using jythonc and keep getting this error on
> > running the
> > class file:
> > Exception in thread "main" java.lang.NoClassDefFoundError: Test
> > By the way, I discovered that it creates test.java too.
>
> Sounds to me like you have the code set up like this ...
>
> # test.py
>
> class Test
>
>     # some stuff
>
> Now, Java (and Python for the most part) is case-sensistive on the
> filesystem level. So, when you compile 'test.py' you end up with
> 'test.class'.
>
> Then in your Java code you try to use the class 'Test'. It then searches
for
> a file called 'Test.class' - and doesn't find it!
>
> Try renaming your file to 'Test.py' (note case) and try again.
>
> Tim Delaney
>





More information about the Python-list mailing list