HELP--using a program's header file!

Ok, I have gone thru the jni tutorial and I understand the HelloWorld example... my problem is, in the tutorial the java part calls a C program that they then write... I need to call an existing program that is not written in java? I have this program's header file and that is all.

How do I use this so that my java program can call the existing non java program? What do I do with it, how should/do I make the dll? The methods sigs. in the non java program's header file do not look like the ones created by javah.exe.

please help, and thanks in advance

[583 byte] By [yeti17] at [2007-9-26 2:55:33]
# 1

What you need to do is

1. Design nice java methods that are the equivalent of the C functions. Define them as "native" - no implementation in java.

2. run javah and generate an h file for those methods.

3. Write a dll in c for the new javah-generated .h file. This will be a very thin layer that translates between java and the original dll. In other words, your new dll mostly just calls the functions in the old dll.

bschauwe at 2007-6-29 10:45:51 > top of Java-index,Java HotSpot Virtual Machine,Specifications...