I’m currently writing a Python-Java bridge. (There are a few already, but mine aims to be maximally seamless: pure Python (it uses ctypes to call into JNI), compatible with Python 3, uses Java reflection so that nothing needs to be declared manually and it feels as much like ordinary Python as possible.) This is because I wanted to access a few Java-only libraries from a Python-based project I’ve been working on, and found that writing a bridge from scratch was less painful than trying to make any of the existing solutions work as well as they should.
Current status: mostly working; haven’t tested generics; still needs support for safe multithreading and Java interface-compatible wrappers for Python collection types (e.g. we want to be able to pass a Python dict into a Java method that wants a java.lang.Map and have any changes be reflected immediately in the original object). I haven’t yet workde on support for subclassing Java classes directly; not sure if I’ll personally need it, but that may be the best way to implement the aforementioned collection wrappers anyway, and it should be fairly simple once I determine the best way to generate Java class file data dynamically and cheaply.
It’s been a bit over a week since I started this; it should be as finished as I need it to be right now after a few more days of work. I’ll probably put it up on github or somesuch, probably under an MIT-type license, though making it polished enough for public consumption isn’t my top priority for it.
I’m currently writing a Python-Java bridge. (There are a few already, but mine aims to be maximally seamless: pure Python (it uses ctypes to call into JNI), compatible with Python 3, uses Java reflection so that nothing needs to be declared manually and it feels as much like ordinary Python as possible.) This is because I wanted to access a few Java-only libraries from a Python-based project I’ve been working on, and found that writing a bridge from scratch was less painful than trying to make any of the existing solutions work as well as they should.
Current status: mostly working; haven’t tested generics; still needs support for safe multithreading and Java interface-compatible wrappers for Python collection types (e.g. we want to be able to pass a Python dict into a Java method that wants a java.lang.Map and have any changes be reflected immediately in the original object). I haven’t yet workde on support for subclassing Java classes directly; not sure if I’ll personally need it, but that may be the best way to implement the aforementioned collection wrappers anyway, and it should be fairly simple once I determine the best way to generate Java class file data dynamically and cheaply.
It’s been a bit over a week since I started this; it should be as finished as I need it to be right now after a few more days of work. I’ll probably put it up on github or somesuch, probably under an MIT-type license, though making it polished enough for public consumption isn’t my top priority for it.