user595234
user595234

Reputation: 6249

how to call DLL from java?

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 ?

Upvotes: 0

Views: 1120

Answers (5)

JavaGeek_101
JavaGeek_101

Reputation: 41

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

Upvotes: 0

k4cy
k4cy

Reputation: 334

See JNI it aims java to interact with other langages... many links have been posted

Upvotes: 0

Becker
Becker

Reputation: 175

all you need is Java Native Interface http://docs.oracle.com/javase/1.5.0/docs/guide/jni/index.html

Upvotes: 0

Chathuranga Chandrasekara
Chathuranga Chandrasekara

Reputation: 20906

System.LoadLibrary can be used to load the libraries. Check this previous thread for example usage

Upvotes: 0

Related Questions