Main Topics
Browse All TopicsHi All,
I am very new to the concept of JNI, is it possible to call .net .ddl from java code?? Please let know me know the process.
Thanks in advance.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Look at:
"Espresso- Java & .NET Native Interoperability - Part I" at
http://www.codeproject.com
JNA makes this a lot easier:
https://jna.dev.java.net/
Hi
You can use Java Native Interface to call the dll from Java
http://java.sun.com/j2se/1
Just look at the above mentioned link and use native loaders like
System.loadLibrary
System.load
to load DLL files from java
My Code is :
public class JNIFoo {
public native String nativeFoo();
static {
System.loadLibrary("C:\\WI
//System.load("C:\\WINDOWS
}
public void print () {
String str = nativeFoo();
System.out.println(str);
}
public static void main(String[] args) {
(new JNIFoo()).print();
return;
}
}
Error Message:
Exception in thread "main" java.lang.UnsatisfiedLinkE
at JNIFoo.nativeFoo(Native Method)
at JNIFoo.print(JNIFoo.java:9
at JNIFoo.main(JNIFoo.java:14
Business Accounts
Answer for Membership
by: ksivananthPosted on 2009-10-15 at 02:38:19ID: 25578788
as long as you write a JNI Wrapper, you would be able to call the function