[Openmcl-devel] Calling Java from OpenMCL
Gary Byers
gb at clozure.com
Fri Apr 23 13:11:32 PDT 2004
On Fri, 23 Apr 2004, Gary King wrote:
> > After wrestling with this for a few days, I basically got distracted.
> > If anyone's
> > interested in exploring this issue further, I can try to locate the
> > code that I was
> > playing with and try to explain a few things in greater detail.
>
> If you can find this could, my group would be interested in looking at
> it. It is not a priority for us yet but may become so in the ever
> receding future. We may be able to look into handfuls of cash too
> though I don't know how likely that would really be.
>
I'm not sure that I ever got much farther than the code that's in
jni.lisp in the bleeding-edge examples directory:
<http://clozure.com/cgi-bin/viewcvs.cgi/ccl/examples/jni.lisp?rev=1.1.1.1&cvsroot=Bleeding-edge&content-type=text/vnd.viewcvs-markup>
Note that that
a) assumed that there were Java interfaces
b) tried to instantiate a 1.2 JVM
c) used the (probably undocumented) :MONITOR-EXCEPTION-PORTS option on
the #_JNI_CreateJavaVM call ; this is/was a way to work around the
issue that I described earlier (and I'd be surprised if bitrot hasn't
affected this somewhat.)
(a) is certainly a solvable problem; I don't seem to have a valid
JDK installed anywhere, but the only header file that was interesting
at this point is/was
"/System/Library/Frameworks/JavaVM.Frameworks/Headers/jni.lisp"
(b) is probably only important if the JNI's changed (or been replaced
by Yet Another Java API in the last couple of years.) I confess:
I haven't been paying attention
A complete interface to the JNI might serve a role similar to the
lower-level parts of the ObjC bridge. My vague recollection is
that the Java runtime's a bit less dynamic (it may be hard to add
methods to existing classes, for instance) than ObjC's is, but I
may be mistaken about that.
More information about the Openmcl-devel
mailing list