Chi-chi Ekweozor wrote:
> Yes, I've followed the instructions in the FAQ about classpaths!
> Nothing's worked and I'm well and truly stuck...help!
> I'm using Java version 1.4.1_01 (checked using java -version) on Win98
> and have downloaded the jython-21.class file into directory C:\Jython.
> Acording to autoexec.bat, I have the following classpath:
> SET PATH=c:\vtk40\bin;c:\j2sdk1.4.1_01\bin;c:\j2sdk1.4.1_01\jre\bin;%PATH%
You don't need both $JAVA_HOME/bin and $JAVA_HOME/jre/bin on your PATH,
only the former. But I don't think that's your problem, since you have the
right one first.
> set CLASSPATH=c:\vtk40\bin\vtk.jar;.
I always put . first in the CLASSPATH, but I doubt order really matters
here, since vtk.jar probably doesn't contain a class called jython-21.
> Does Jython need to be somewhere in there? What should it look like?
. should cover it, as long as you run jython-21 from the $JYTHON_HOME
> I get the dreaded java.lang.NoClassDefFoundError for the following commands:
> >java jython-21
> >java -cp . jython-21
> >java -cp -classpath c:\Jython\jython-21.class
The first two are legal, and either should work, assuming you're running
them from c:\jython. (The first relies on . being in your CLASSPATH; the
second does not.) Actually, jython-21 runs fine for me even with an empty
CLASSPATH and no -cp argument, though that behavior may not be portable.
The third line is illegal.
I don't see anything you're doing wrong.
Maybe your Jython download was bad. My jython-21.class is 2780547 bytes.
If yours is shorter, re-download.
Go to http://java.sun.com/tutorial and work through the simple "Hello
World" tutorial, to verify that you have a working Java setup. If you
can't get Hello World to work either, then I recommend uninstalling and
reinstalling your Java Development Kit.
David Ripton dripton@...