> I am trying to call functions on the dll from Java, but all the things
> I have read include running javah on the class file (which I can
[quoted text clipped - 5 lines]
> feasible because there are hundreds and hundreds of functions, and I
> don't have enough time to write a library for them all.
Unfortunately for you, the technical reality of things doesn't care
how much time you've got, and Java does not offer any other technical
solutions. You can't invoke arbitrary C functions from a Java
application. The library must have been written to be used from Java,
wrapped suitably, or moved to a separate process that you communicate
with using other mechanisms.
Consider that using JNI doesn't necessarily mean that you need to wrap
your functions on a 1:1 basis. Choose a suitable place for your JNI
boundary, e.g. by moving it to a higher abstraction level you might
get a smaller contact area.
Or perhaps you don't really need all of those hundreds and hundreds of
functions. You only need to write wrappers for the stuff actually used
by your application.
There might also be some commercial products that can automate the
wrapping.
/gordon

Signature
[ don't email me support questions or followups ]
g o r d o n + n e w s @ b a l d e r 1 3 . s e
Bill Medland - 30 Oct 2006 18:04 GMT
>> I am trying to call functions on the dll from Java, but all the things
>> I have read include running javah on the class file (which I can
[quoted text clipped - 24 lines]
> There might also be some commercial products that can automate the
> wrapping.
http://www.excelsior-usa.com/xfunction.html
might suite the OP's needs.
> /gordon

Signature
Bill Medland