Last updated April 18, 2012 18:05, by sonyabarry

PlyJy Wiki

Purpose of Project

The focus of this project is to provide code implementations for utilizing Jython object factories. Jython object factories are used to coerce Jython classes into Java classes so that Jython code can be seamlessly integrated into Java projects. The implementations in this project are documented in this wiki, and can be used directly if the JAR is downloaded and placed into your project's classpath.

How are Jython Object Factories Implemented?

In order to implement Jython object factories, you need to follow a simple recipe containing the following steps:

  • Java interface containing the definitions of the methods you wish to utilize from your Jython class
  • Jython module contained within the sys.path
    • Jython class within the module must implement the Java interface you've defined
  • Code or use a Jython object factory like the ones included in this project
    • Use the PySystemState to obtain a reference to your Jython module
    • Use the PythonInterpreter to obtain a reference to your Jython module

Object Factories In This Project

JythonObjectFactory - Utilizes PythonInterpreter

PySystemObjectFactory - Utilizes PySystemState

If you have any questions or suggestions, please email the mailing list

  • Mysql
  • Glassfish
  • Jruby
  • Rails
  • Nblogo
Terms of Use; Privacy Policy;
© 2014, Oracle Corporation and/or its affiliates
(revision 20160708.bf2ac18)
Please Confirm