--- title: "Initialize the library" url: "https://docs.adyen.com/point-of-sale/classic-library-deprecation/classic-library-integrations/java-native-interface-integration/key-steps-jni/initialize-the-library-jni" source_url: "https://docs.adyen.com/point-of-sale/classic-library-deprecation/classic-library-integrations/java-native-interface-integration/key-steps-jni/initialize-the-library-jni.md" canonical: "https://docs.adyen.com/point-of-sale/classic-library-deprecation/classic-library-integrations/java-native-interface-integration/key-steps-jni/initialize-the-library-jni" last_modified: "2026-05-23T12:56:20+02:00" language: "en" --- # Initialize the library [View source](/point-of-sale/classic-library-deprecation/classic-library-integrations/java-native-interface-integration/key-steps-jni/initialize-the-library-jni.md) ## Class | Name | Description | | ------------- | ----------------------------------------------------------------------------------------------------------------------------------- | | `MerchantPos` | Extends `AdyenPos`. Class used to implement all functions that do not involve the PED. Implement the `MerchantPos` object yourself. | ## initLibraryRequest Parameter | Name | Description | | -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `initLibraryRequest` | Object to hold parameters needed for library initialization. Use a builder pattern an `initLibraryRequest` and use it as parameter for (your instance of)  `MerchantPos.initLibrary()`.   | ## Method | Name | Description | | ------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `initLibrary` | Method used to begin library Initialization.This method returns an immediate response of type `LibraryResult`. Check if this result is "OK", before continuing the operation. If the `LibraryResult` value is not "OK", the system will not return the related callback with the asynchronous result. See [here](/point-of-sale/classic-library-deprecation/classic-library-integrations/java-native-interface-integration/key-steps-jni/process-a-basic-transaction-jni/handle-and-extract-data-from-callbacks-jni) for more on extracting data from an event or callback. | ## initLibraryRequest Attributes | Name | Type | Required | Description | | -------------------- | ----------- | ------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `libraryEnvironment` | Environment | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-") | The execution environment. | | `posId` | String | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-") | The unique POS ID. | | `integratorName` | String | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-") | The name of the integrator company, defined for logging reasons.This value should be the name of the company deploying cash register or Point-of-Sale solution, for example,  **Retail Consultancy Corp.** | | `logConfig` | LogConfig | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-") | Object containing logLevel. For more information on setting the log level, see [Logging](/point-of-sale/classic-library-deprecation/classic-library-integrations/java-native-interface-integration/key-steps-jni/logging-jni). | | `posName` | String | ![-x-](/user/data/smileys/emoji/x.png "-x-") | The symbolic POS name. | | `appName` | String | ![-x-](/user/data/smileys/emoji/x.png "-x-") | The Integrator/Merchant App ID.Format this value like so: **Cash register company and product** /** Cash register product version** / **Adyen integration name** / **Adyen integration version**. For example,  **Acme Corp POS** / **1.2.1** / **Acme Adyen connector** / **0.1 ** | | `logLevel` | String | ![-x-](/user/data/smileys/emoji/x.png "-x-") | Defines the level of logging provided. | ## Callback | Name | Description | | --------------------- | ------------------------------------------------- | | `initLibraryCallback` | Returns the result of the library initialization. | ## Callback Response Attribute | Name | Description | | --------------- | -------------------------------------------------- | | `libraryResult` | The result of the initialization of the C Library. |