This project demonstrates how to use Driver License Parser library for Java from IDScan.net.
-
Download the latest version of Driver License Parser Library for Java for target platform. The archive contains next components:
- linux_x86/linux_x86_64
./ ├ dlparserlib.jar ├ libidscan_parser.so
- win32_x86/win32_x86_64
./ ├ dlparserlib.jar ├ idscan_parser.dll
- linux_x86/linux_x86_64
-
Add libs directory to the project and put into appropriate library files. The project structure looks like this:
- Linux
- MODULE ├ src | ... ├ libs └ dlparserlib.jar └ idscan_parser.so
Note you have to use .so matching your target platform(x86 / x86_64).
- Windows
- MODULE ├ src | ... ├ libs └ dlparserlib.jar └ idscan_parser.dll
Note you have to use .dll matching your target platform(x86 / x86_64).
- Linux
-
Add dlparserlib.jar to the project as external jar file:
-
Setup Dynamic Link Library. dlparserlib.jar depends on a native library. You need to setup java.library.path variable so that Java VM can find the appropriate library.
-
Download the latest version of Driver License Parser Library for Java for target platform. The archive contains next components:
- linux_x86/linux_x86_64
./ ├ dlparserlib.jar ├ libidscan_parser.so
- win32_x86/win32_x86_64
./ ├ dlparserlib.jar ├ idscan_parser.dll
- linux_x86/linux_x86_64
-
Add libs directory to the project and put into appropriate library files. The project structure looks like this:
- Linux
- Project ├ src | ... ├ libs └ dlparserlib.jar └ idscan_parser.so
Note you have to use .so matching your target platform(x86 / x86_64).
- Windows
- Project ├ src | ... ├ libs └ dlparserlib.jar └ idscan_parser.dll
Note you have to use .dll matching your target platform(x86 / x86_64).
- Linux
-
Add dlparserlib.jar to the project as external jar file:
-
Setup Dynamic Link Library. dlparserlib.jar depends on a native library. You need to setup java.library.path variable so that Java VM can find the appropriate library.
- Create
DLParser
object.
DLParser parser = new DLParser();
- Setup License Key. For setup License Key you need to call
setup(String)
. It accepts license key encoded as Base64 string.
try {
parser.setup("** LICENSE_KEY **");
} catch(DLParserException e) {
// TODO: handle the error.
}
- Parse the data. For parsing data you need to call
parse(byte[])
method.
try {
DLResult res = parser.parse(data);
} catch(DLParserException | UnsupportedEncodingException e) {
// TODO: handle the error.
}
You will find a complete example of using the library in the Main.java
.