From: Moyer, T. <TMoyer@TALK.COM> - 2003-03-13 14:05:51
|
> How do I run a java class from a jython file? > > eg. if I have a file mjc.java and corresponding mjc.class file in the > same directory. > I am not able to do "java mjc" from the jython file. > How can I do that in order to run jython scripts? You use a Java or Jython class in exactly the same way. The only difference is the import statement. from MyPak.MyGroupJy import MyGroupJy as MyGroup # jython from MyPak import MyGroup as MyGroup # java group = MyGroup (dataFile) In this example, the sub-directory MyPak contains: MyGroupJy.py MyGroup.class Cheers, Todd Moyer |