简体   繁体   English

如何访问指纹驱动程序

[英]How to access the finger print driver

Can I access my laptop finger print driver using Java? 我可以使用Java访问笔记本电脑的指纹驱动程序吗? I am using Fedora as my OS ? 我使用Fedora作为操作系统? Are there any supporting libraries available for java to doing this or Can i do this with C/C++ languages? 是否可以使用Java支持库来执行此操作,或者可以使用C / C ++语言来执行此操作?

Short answer, no probably not. 简短的答案,可能不会。

Long answer, your fingerprint scanner on your laptop has specific drivers built for it by the manufacturer for specific operating systems. 长答案,笔记本电脑上的指纹扫描仪具有制造商针对特定操作系统为其构建的特定驱动程序。 You need to find an open source version of those drivers for your specific operating system. 您需要为您的特定操作系统找到这些驱动程序的开源版本。 Since you're on Linux, there's a relatively good chance that those open source drivers exist and you can download them. 由于您使用的是Linux,因此这些开源驱动程序存在的可能性相对较高,您可以下载它们。

After retrieving the source code for the drivers, you'll need to access them from Java. 检索驱动程序的源代码后,您需要从Java访问它们。 If the drivers are written in C, this means writing your own C interface and accessing your C interface with Java Native Interface (JNI). 如果驱动程序是用C编写的,则意味着编写您自己的C接口并使用Java Native Interface(JNI)访问C接口。

The problem with this is that you have to compile the driver's source code and your own interface for each operating system and architecture you plan on using your code with (x32 and x64, Windows, Mac, Linux, etc) and then dynamically choose the correct library to load at runtime. 这样做的问题是,您必须为计划使用(x32和x64,Windows,Mac,Linux等)代码的每种操作系统和体系结构编译驱动程序的源代码和自己的接口,然后动态选择正确的库在运行时加载。

If this is just a side project for the heck of it, I'd say jump in and try to find open source drivers for your fingerprint scanner, and start getting familiar with C and JNI if you aren't already. 如果这只是它的附带项目,我想说一下,尝试为您的指纹扫描仪找到开源驱动程序,如果还没有,请开始熟悉C和JNI。

If this is for a larger project, you need to be pretty careful about licensing issues with whatever drivers you find. 如果这是用于较大的项目,则需要谨慎对待所发现的任何驱动程序的许可问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM