From: Durant Schoon <simulus@mi...> - 2002-09-12 03:30:33
Thanks to Oti for answering my question about how to implement an
interface with a python class (answer: just inherit from it! Easy!).
How do I specify the classpath on the jython command line?
I want to do something like one of these:
jython windows\path\file.py -Dpython.jythonc.classpath="C:\foo\bar.jar"
jython windows\path\file.py -Dpython.jythonc.classpath="C:/foo/bar.jar"
jython windows\path\file.py -Djava.class.path="C:\foo\bar.jar"
None worked. I'm hoping I just need the right name of the property,
and/or correct slash orientation.
Why would I want to do this instead of setting my java classpath in my
AUTOEXEC.BAT or other environment file?
Well, I just moved a whole bunch of jars and classpath information into
a build.xml file for use with ant. I can compile my jython module and run
it just fine, but the turn around time is excruciatingly long (especially
since the jythonc ant task I grabbed off the net doesn't seem to handle
dependencies, it just compiles everything, not just the files that have
changed). The great thing about python is that I can just change something
and run it to see if it works. Having to wait to recompile class files every
single time I discover a runtime error is going diminish that great feature
of python as jython.
What I want to do is set up an ant task which runs jython with my classpath
information which is defined once in my build.xml file (already works for
jythonc). Then when I know my jython modules are working, I can just
compile them into .class files (slow, but done infrequently). All I need is
the command line syntax for specifying my entire java class path.
I hope I didn't miss this on the jython web page (might have). I checked the
jython FAQ and searched on google (the first 10 results for "jython
I hope this one is easy, too.