|
From: <lc...@cs...> - 2007-06-12 03:46:14
|
Hello,
I need to call a java application from a python program. I see that I =20
can create a jython program which have a similar sintax of a python =20
program, even it has the same file extension. I can either compile it =20
using jythonc into a .class file or run it with the jython executable =20
file (jython file.py). I need to know if there is a way to do the =20
opposite, this means to just execute the Jython program using the =20
python command (from the console, like: python file.py). I tried it =20
but it didn't work I get the following error:
C:\jython2.2b2>python listing7.py
Traceback (most recent call last):
File "listing7.py", line 1, in ?
from java.util import Random
ImportError: No module named java.util
I am trying to run a small example that imports the Random class, but =20
it doesn't recognize it. When I use the jython command there is no =20
problem it executes it well. Please let me know what I am doing wrong =20
and also if there is a way to execute the jython programs using python.
Thanks,
Lorena Carlo
|