Skip to content

Commit 1fb968e

Browse files
update to internal commit 7ea85487
1 parent af8555e commit 1fb968e

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

license-activation/index.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,17 @@ Dynamsoft.License.LicenseManager.initLicense("YOUR_LICENSE_KEY");
7979
```
8080
>
8181
```java
82-
BarcodeReader.initLicense("YOUR-LICENSE-KEY");
83-
BarcodeReader reader = new BarcodeReader();
84-
// add further process
82+
try {
83+
LicenseError licenseError = LicenseManager.initLicense("YOUR-LICENSE-KEY");
84+
if (licenseError.getErrorCode() != EnumErrorCode.EC_OK) {
85+
System.out.println("License initialization failed: ErrorCode: " + licenseError.getErrorCode() + ", ErrorString: " + licenseError.getErrorString());
86+
return;
87+
}
88+
} catch (LicenseException e) {
89+
System.out.println("License initialization failed: ErrorCode: " + e.getErrorCode() + ", ErrorString: " + e.getErrorString());
90+
return;
91+
}
92+
// add further process
8593
```
8694
>
8795
```java

0 commit comments

Comments
 (0)