convert javah headers to D

Nicholas Jordan asdf at some.com
Mon Mar 16 08:46:46 PDT 2009


import placed in source file, will do a build later today as I am
swamped with simple survival stuff today.

What I don't get is, given that javap pulls headers, I tried to use
the headers so that the JVM could call the dll. So far, so good,
except that it would be much more in the style intent and manner of D
to just write the calls and make the whole thing reliant on a header
style we are trying to get away from.

Thus, I don't know how to prototype the function. There is JNIEnv /
jobject both of which resolve to "some computer stuff like we have
always known it" ... the JNIEnv is double indirection, jobject amounts
to something along the lines of a strongly typed pointer.

If we could expose the function entry points to the JVM using D
syntax, I am sure the entry from the JVM would be 190% better.

That is what my question actually is: "How do I expose the function
entry points to a running JVM - given that this code is called as a
loadable runtime?"

I re-coded my def file several times, think I have got the entire
syntax starting to memorize. I put everything in there I could find in
the docs, have to recode the EXPORTS as on of the editors I tried ate
my sources last night.

The massive array running down the middle is a bench hack as the
compiler kept complaining about how I was doing the pointers. That is
to be a data space some 1 to 100 kb by which I can pass data if I can
not get anything else to work.

The intent is to write Java code, bring in an image using EZTwain, do
OCR on it.


More information about the Digitalmars-d-learn mailing list