That's not how Java works. You can't just call functions in a DLL.
The DLLs you load through System.load and System.loadLibrary are only used for implementation of native methods. So to be able to use the functionality in that DLL file you will need two extra layers: a Java class with native methods, and a JNI bridge between the Java class and the functions in the DLL.
however, i want to know if i get abc.dll without any documentation, is there a way that can be used to know that there is a method abc1 which takes no arguments and returns nothing?
JNI doesn't work like that -- you can't use it to call any DLL. To be quite honest, if you don't know what's in a DLL, is it really a good idea to call it?
In this example "native void abc1()" will execute a call to a function with a name based on both the package and name, and actually pass it parameters (at minimum, the java context). To get the actual C/C++ signature, you have use the javah tool to generate an include file (.h file) from the class file.
And with the include file, you are supposed to write the implementations, and generate a DLL. Now... of course, from the C/C++ code (your implementation), you can call the functions in this other DLL, but again, if you don't know what it does, is it really a good idea to use it?
Henry [ December 17, 2008: Message edited by: Henry Wong ]
JNI doesn't work like that -- you can't use it to call any DLL.
No, but you can use JNI wrappers to do all the legwork for you, so you don't have to write your own JNI DLLs/bridges. For example, JNIWrapper. The resulting program will be faster writing your own bridge, but if speed isn't essential...
Charles Lyons (SCJP 1.4, April 2003; SCJP 5, Dec 2006; SCWCD 1.4b, April 2004)
Author of OCEJWCD Study Companion for Oracle Exam 1Z0-899 (ISBN 0955160340 / AmazonAmazon UK )