File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to link .net dll to java

 
bharani rao
Ranch Hand
Posts: 164
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,

i was want to link the .net dll created by a .net programer with java program.
i want to know the changes to be made in the java program to link that .net dll.

just as i'm using JNI to link various other programs using the native method created,



like we use the above native method in c++ or any other program, i want the coding for the java program for the following file




this is the header file




so i need to know what should be my java file be like???

Thanks in advance

 
Ulf Dittmer
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JNI does not work directly with .Net. You'll need to create a C++ wrapper around the .Net library; then you can use JNI to interact with it.
 
bharani rao
Ranch Hand
Posts: 164
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,

how to create a c++ wrapper.


Thank you
 
Rob Spoor
Sheriff
Pie
Posts: 20372
44
Chrome Eclipse IDE Java Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
http://faq.javaranch.com/java/ShowSomeEffort
http://faq.javaranch.com/java/SearchFirst

If you use Google, the first link is http://www.jnbridge.com/jnbpro.htm?gclid=CMKNzqfv5pkCFYFA3god8G5-RQ. That is a commercial product though.
 
bharani rao
Ranch Hand
Posts: 164
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
sorry and thank you, rob
 
bharani rao
Ranch Hand
Posts: 164
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,

kindly tell how to write a wrapper class..
i searched this site but dint get .

the info is provided above...

i will run java program and the java should call .net dll

kindly help.


Thanks in advance.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic