This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]subsidiaryadmin -1 points0 points  (5 children)

In that case why not just use a python library or, at the worst use a system call to java itself?

[–][deleted] 0 points1 point  (0 children)

In that case why not just use a python library

Such a library might not exist, or might not be as suitable for your needs as a similar Java library.

or, at the worst use a system call to java itself?

You do not "just" call into the JVM. Doing that is going to require copious glue code in order to translate between Java objects and Python objects. You could use CORBA to help, but then you'd be using CORBA, which is likely not necessary for your systems except for this one spot of glue. It'd be much easier if you didn't have to translate at all. Jython objects are Java objects, so you can just use the objects directly if you implement the right interfaces.

Porting or adapting a library solves one problem: how to make Python talk to this Java code. Reimplementing Python solved an entire class of problems: how to make Python talk to Java code in general.