tags:

views:

453

answers:

1

Jython's PyObject provides a method to cast a python object to java. There are some old articles on Jython Monthly describing the use of __tojava__ to create a jython object factory

Besides the need for an interface, are there any other limitations to using Jython to create "java" objects.

+1  A: 

Jython objects won't play well with javas serialization system and there used to be serious problems with introspection. I have not yet tested the introspection issues in the latest jython releases, so this might be an outdated issue. But other than these minor things, in my experience everything else works well.

kasperjj