|
From: Jeff E. <jem...@fr...> - 2007-06-12 04:02:54
|
Change p to j c:\jython2.2b2>jython listing7.py lc...@cs... wrote: > Hello, > > I need to call a java application from a python program. I see that I > can create a jython program which have a similar sintax of a python > program, even it has the same file extension. I can either compile it > using jythonc into a .class file or run it with the jython executable > file (jython file.py). I need to know if there is a way to do the > opposite, this means to just execute the Jython program using the > python command (from the console, like: python file.py). I tried it > 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 > it doesn't recognize it. When I use the jython command there is no > problem it executes it well. Please let me know what I am doing wrong > and also if there is a way to execute the jython programs using python. > > Thanks, > > Lorena Carlo > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Jython-users mailing list > Jyt...@li... > https://lists.sourceforge.net/lists/listinfo/jython-users |