This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes Other JSE/JEE APIs and the fly likes x628 - finger print dll control + how with java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "x628 - finger print dll control + how with java " Watch "x628 - finger print dll control + how with java " New topic
Author

x628 - finger print dll control + how with java

hassan ali
Ranch Hand

Joined: Apr 23, 2006
Posts: 127
hi

i am trying to conect to finger print machine(x628) using java,
this machine has Control DLL files

in VB.net
you must register it by
some thing like this

REGSVR32 "C:\Documents and Settings\samah\My Documents\sdkx688\sdkx688\zkemkeeper.dll"

and
this line to get object of its class
Dim ObjFinger As New zkemkeeper.CZKEM


i have tryied to native method using jni
like this
public static native boolean Connect_Net(String ipAdd,int port);

in class with and without this name CZKEM



to connect
but faild .

does some one knows how can i solve this ?



Henry Wong
author
Sheriff

Joined: Sep 28, 2004
Posts: 18878
    
  40



Please do *not* crosspost. It wastes people's time and effort.

I have deleted many of the other posts -- this one shall remain because this forum is the most appropriate for JNI topics. There also seems to be one other topic in "advanced", that has been locked by another moderator.

Henry


Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
Henry Wong
author
Sheriff

Joined: Sep 28, 2004
Posts: 18878
    
  40


i have tryied to native method using jni
like this
public static native boolean Connect_Net(String ipAdd,int port);

in class with and without this name CZKEM



JNI isn't designed to allow you to call any DLL -- it is used to get you to C/C++, which in turn, can be used to get to any DLL.

Basically, after you declare your native methods.... (1) use the javah tool to generate the C/C++ include files, which (2) you use to write your own C/C++ stubs to load and call the external DLL. (3) This newly created C file needs to be compiled into a DLL, which (4) can be loaded by your java class using the load() methods.

In other words, you need to write a C/C++ layer, which conforms to the JNI specification, that acts like a bridge between Java and your external DLL.

Henry
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: x628 - finger print dll control + how with java