what are the limitations of jython's PyObject.__tojava__ method?

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.

Asked by: First Name454 | Posted: 28-01-2022

Answer 1

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.

Answered by: Kelvin244 | Posted: 01-03-2022

Similar questions

Still can't find your answer? Check out these amazing Java communities for help...

Java Reddit Community | Java Help Reddit Community | Dev.to Java Community | Java Discord | Java Programmers (Facebook) | Java developers (Facebook)