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

java - DLL communication

 
vijay kumar
Ranch Hand
Posts: 62
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
i want to call a DLL from my java code and need to pass some parameter to it.

can any one help me how to comunicate with DLL through java.

Thanks in advance

Regards,
Vijay.
 
Ulf Dittmer
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There would need to be some kind of JNI wrapper between the Java code and the DLL. Libraries like Jacob or JCom can remove much of the pain of creating these.
[ July 26, 2007: Message edited by: Ulf Dittmer ]
 
Timothy Wall
Greenhorn
Posts: 14
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by vijay kumar:
Hi,
i want to call a DLL from my java code and need to pass some parameter to it.

can any one help me how to comunicate with DLL through java.



JAWIN and JACOB provide good access to COM-based DLLs. JNA provides easy access to DLLs which export a standard C interface.
 
Jesper de Jong
Java Cowboy
Saloon Keeper
Pie
Posts: 15150
31
Android IntelliJ IDE Java Scala Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JNI is the standard API to call native code, such as functions in a DLL. However, JNI can be hard to use and may require you to write some C or C++ code.

There are some libraries to make working with native code easier. Have a look at these ones:

NativeCall - Call native methods from Java without JNI
J/Invoke - The easy JNI replacement

These allow you to call native functions without having to write native wrapper functions yourself.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic