From: Kent J. <ke...@td...> - 2004-06-02 22:45:17
|
PyServlet (in the Jython distribution) does something similar to this - it finds and loads a Jython module, extracts a Java class (defined in jython) from the interpreter, instantiates the class and later dispatches to a method in the class. You may also find this useful: http://pnuts.org/~tomatsu/embedding.html Kent > > From: Luke Bailey <ja...@sp...> > Date: 2004/06/02 Wed PM 05:34:48 EDT > To: jyt...@li... > Subject: [Jython-users] Embedding Jython in Java > > Hello, > > I'm want to use Jython as a scripting language for a program I am > writing in Java. Here's what I want to do. > 1) Load a Jython module (a .py file) into a Java Object for future use > 2) At some time during the Java programs execution, have this object > call a function from within the > Jython module. > 3) The Jython functions will then go about accessing Java objects in > the program. > > Now I've found plenty of examples on how to access java objects from a > Jython script but no examples on how to call a Jython function from > within Java. Does anyone know of any online examples for this? > > Luke Bailey > > > > ------------------------------------------------------- > This SF.Net email is sponsored by the new InstallShield X. > From Windows to Linux, servers to mobile, InstallShield X is the one > installation-authoring solution that does it all. Learn more and > evaluate today! http://www.installshield.com/Dev2Dev/0504 > _______________________________________________ > Jython-users mailing list > Jyt...@li... > https://lists.sourceforge.net/lists/listinfo/jython-users > |