Skip to content
LeeKamentsky edited this page Aug 1, 2014 · 1 revision

= Roadmap =

This is an informal roadmap for Javabridge's development. The major drivers for development right now are CellProfiler's use of the Javabridge to access Java, ImageJ (https://github.com/imagej) and Bio-Formats (https://github.com/openmicroscopy/bioformats, https://github.com/scifio). A secondary driver is support of Javabridge's use in Scijava's scripting-cpython (https://github.com/scijava/scripting-cpython).

== Calling Python from Java ==

There's a clear need for a facility to do a Python eval or exec from within Java and to implement Python methods for Java interfaces (see the proxy branch: https://github.com/CellProfiler/python-javabridge/tree/proxy). AWT calls need to be made on the UI thread. A couple strategies:

  • The proxy mechanism could detect that it is in the UI thread and run the runnable queue loop while waiting for the method invocation to complete on the Python invocation thread. That would let the Python invocation thread post runnables to the UI thread.

  • We could implement a JNI class capable of performing Python exec and eval calls. The Python thread context and GIL could be handled using code from wx (or borrow the ideas for their mechanism) that remembers the Python thread state and recaptures the GIL when going from Python to Java.

The second mechanism is a bit of work, but has more utility long-term.

Clone this wiki locally