how to call DLL from java ? I want to integrate a java application to Windows. Let me take Outlook as an example, I have the Outlook dll, then how to call it ? do we have similar tutorial ?
Asked
Active
Viewed 1,100 times
0
-
1google is your friend: one of the first hits: http://support.microsoft.com/kb/222092 AND http://stackoverflow.com/questions/771145/how-do-i-call-dll-inside-java – tagtraeumer May 31 '12 at 14:02
5 Answers
1
Use Java Native Access (JNA) : http://jna.java.net/
http://twall.github.com/jna/3.4.0/javadoc/overview-summary.html#overview_description

gustavogabr
- 91
- 1
-
with jna you dont neeed to write c/c++ code, works only with java! much more easy then jni! – gustavogabr May 31 '12 at 14:09
0
System.LoadLibrary can be used to load the libraries. Check this previous thread for example usage

Community
- 1
- 1

Chathuranga Chandrasekara
- 20,548
- 30
- 97
- 138
0
all you need is Java Native Interface http://docs.oracle.com/javase/1.5.0/docs/guide/jni/index.html

Becker
- 175
- 2
- 3
- 11
0
You need to use JNI to call native functions. In your case it you need to load Library first in memory using Runtime.getRuntime().loadLibrary(PATH_OF_DLL_FILE)
you can use following link too http://www.equestionanswers.com/dll/java-call-dll-functions.php

JavaGeek_101
- 41
- 1
- 5