--- title: "Exit the library" url: "https://docs.adyen.com/point-of-sale/classic-library-deprecation/classic-library-integrations/java-native-interface-integration/key-steps-jni/exit-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/exit-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/exit-the-library-jni" last_modified: "2026-05-24T12:54:31+02:00" language: "en" --- # Exit the library [View source](/point-of-sale/classic-library-deprecation/classic-library-integrations/java-native-interface-integration/key-steps-jni/exit-the-library-jni.md) Exit the library before you turn the POS off. The call and the callback are asynchronous to prevent the call from blocking the calling thread. ## Class | Name | Description | | ------------- | ------------------------------------------------------------------------------------------------------------------------------------- | | `MerchantPos` | Extends `AdyenPos`. Class used to implement all payment platform functionality. Implements all functions that do not involve the PED. | ## Method | Name | Description | | ------------- | ------------------ | | `exitLibrary` | Exits the library. | ## Callback | Name | Description | | --------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `exitLibraryCallback` | Callback to the exit library call. The POS must wait until the system returns a callback, the library has been successfully discarded and all related resources are destroyed before continuing with other functions |