Solved

JNI and 3rd party dll's

Posted on 1998-06-30
3
381 Views
Last Modified: 2012-08-14
Is it possible to use JNI to invoke from a JAVA program "C" functions on a 3rd party vendor dll?  I don't have access to the source code from which the dll originated.  If the answer is yes, can you please provide me detailed instructions on how to do this?
0
Comment
Question by:gumtowv
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 2

Expert Comment

by:aziz061097
ID: 1224191
Do you atleast know the name of the functions or methods and their parameters ?
0
 
LVL 5

Accepted Solution

by:
msmolyak earned 100 total points
ID: 1224192
As long as you know the API of the third party DLL (as pointed to by aziz) you can do that by creating your own DLL whose functions on one hand are the implementations of Java native methods and on the other hand call the appropriate functions in the third party DLL. I've done it some time ago for ODBC where the ODBC driver is the third party DLL with the known API.
0
 

Author Comment

by:gumtowv
ID: 1224193
Yes, I know the 3rd party vendor API.  Thank you for your response.  Excellent!
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
Suggested Courses

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question