You want a generic interface where you can arbitrarily dig around in the JVM? This will probably crash a lot, depending on what you touch. Java is strongly typed so the JVM will have internal assumptions on types etc.
Or do you have one particular java program that you want to call from Python? This can be made 100% solid. Just write C/C++ JNI bindings for the Java function that you want to call. Then access those bindings through Cython. And launch the JVM from the Cython code. On Wednesday, March 18, 2015 at 2:50:37 AM UTC+1, kcrisman wrote: > > Short version: is there a way to get Sage to interface with a *Java* > program not via pexpect, but a library interface? (Perhaps Jython?) See > http://trac.sagemath.org/ticket/17902 for some background, in particular > http://trac.sagemath.org/ticket/17902#comment:7 > > "I have been reading over Chapter 6 of W. Stein's "​Sage for power users > <http://modular.math.washington.edu/books/sagebook>" and possibly the > best strategy for calling CGSUite might be option (4): Create a C/C++ > library interface and link the other program into Python itself, using > Cython. But of course in the case of CGSuite, this would be "Create a Java > library interface ..." So I want to ask here what capabilities of this > kind (calling Java) Sage has? Can Sage use Jython, for example?" > -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at http://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.