website logo
⌘K
Getting Started
Introduction
Basic Concepts
Opening an Account
Creating & Configuring Products
Integrating SDK and Configuring License Fulfillment
Activate a Key-Based License
Vendor Platform
Issuing New Licenses
License Detail View
Order Detail View
Customer Detail View
Metadata
Analytics
Settings
Product Configuration
Product Features
Product Custom Fields
Product Versioning
License Policies
Product Bundles
License Entitlements
License Types
Activations & Device Transfers
Features
Custom Fields
License Start Date
License Note
Maintenance Period
Trial Licenses
Floating Licenses
License Activation Types
Portals
End-User Portal
Offline Portal
Air-Gapped Portal
License API
License API Authorization
License Activation/Deactivation
License Check
Consumption
Floating
Trial Key
Product Details
Device Variables
Changing Password
Management API
Making API Requests
Management API Authorization
Customer
Product
Order
License
Device
Analytics
SDKs
Tutorials
.NET/C# SDK
.NET/C# Management SDK
C++ SDK
Java SDK
Python SDK
Go SDK
Delphi SDK
Swift/Objective-C SDK
Android SDK
Unity SDK
Errors and Response Codes
Floating Server
API Reference
Deployment
Configuration
Floating Server UI
Securing the Server
Whitelabeling
FAQ
Floating Server Changelog
Integrations
Salesforce
FastSpring
Stripe
Shopify
Common Scenarios
Single Sign On (SSO)
Glossary
General
SDK Glossary
Vendor Platform
Product Configuration Glossary
License Configuration
Postman Collections
Frequently Asked Questions
Changelog
License API changelog
Platform changelog
Docs powered by
Archbee
SDKs

Java SDK

85min

The Java License Client module embodies essential license functionalities, encompassing tasks like online and offline license activation and deactivation, provisioning trial licenses, recording usage instances, and monitoring variables.

The Floating Client serves as the foundational module with a specific emphasis on floating license functionalities. For a deeper understanding of floating licenses, additional information can be accessed by referring to the provided resource on Floating Licenses.

The Management SDK module offers a collection of APIs designed to generate license keys and facilitate order placement. For further details about the general Management API, see our Management API Documentation.

Minimum Java version for this SDK is 8.161.

If you are unsure which SDK module to implement, visit Java Modules to learn what each module offers.

From version 2.2.0 onwards, you can find all the release artefacts - direct downloads, including hosted Javadoc links on our Javadoc & Downloads page.

Release Notes

September 14th, 2023, v2.8.6

All SDK's

  • added resetConsumption and consumptionPeriod to LicenseFeature class

July 10th, 2023, v2.8.3

All SDK's

  • Changed the exception message (ConnectionException) when there are problems with proxy auth. New message is:
    • "Failed to authenticate with the proxy server. Please check your proxy credentials setup or contact your IT department for assistance."

July 3rd, 2023, v2.8.2

All SDK's

  • Added id and deviceId fields to the LicenseData class

June 26th, 2023, v2.8.1

License Management

  • Fix error decoder empty code and message fields

April 28th, 2023, v2.8.0

License Management

  • BREAKING: Changed single user to list of users in OrderLicense class
  • Added isManager boolean field to UserBasedLicense class

April 28th, 2023, v2.7.0

All SDK's

  • Add support for parsing date when creating ZonedDateTime License Client
  • Fixed AirGapped signatures

March 17th, 2023, v2.6.2

Floating Client

  • Fix when using only checkLicense() (without activateLicense() - example: on app restart)

March 1st, 2023, v2.6.1

License Client

  • Changed AirGapped to use Java classes instead of BouncyCastle

February 28th, 2023, v2.6.0

All SDK's

  • licenseSignature verification fix (pem files)

January 30th, 2023, v2.5.9 - BROKEN VERSION

License Client

  • Remove unused BouncyCastle provider in AirGappedService

January 17th, 2023, v2.5.8 - BROKEN VERSION

License Client

  • Renewed the code signing certificate

January 16th, 2023, v2.5.7 - BROKEN VERSION

License Client

  • Removed BouncyCastle provider for AirGap - use default provider

January 10th, 2023, v2.5.6 - BROKEN VERSION

License Client

  • Added support for multiple licenses on the same device. Added the LicenseManagerFactory for creating multiple LicenseManager objects (one for each different license)
  • Added support for offline user-based licences

November 4th, 2022, v2.5.5 - BROKEN VERSION

License Client

  • Added AirGappedService and LicenseSpringManager methods: getAirGapActivationCode(), verifyAirGapConfirmationCode(), activateAirGapResponse()

August 10th, 2022, v2.5.4

License Client

  • Added reinitialize() methods to LicenseManager

June 28th, 2022, v2.5.3

All SDK's

  • Corrected query parameters on azure metadata endpoint

June 10th, 2022, v2.5.2

All SDK's

  • Added azure environment variable WEBSITE_INSTANCE_ID check to HardwareIdStrategy.AUTO_NODE_LOCK

May 18th, 2022, v2.5.1

All SDK's

  • Updated OSHI library to 6.1.6 version

December 21st, 2021, v2.5.0

License Client and Floating Client

  • Added verification on any kind of license load.

December 20th, 2021, v2.4.16

License Client and Floating Client

  • Added verification of license on every check call.

December 14th, 2021, v2.4.15

All SDK's

  • Added HardwareIdStrategy.NO_DISK_HARDWARE_ID, for creating hardware IDs without disk information (in case of removable card readers or similar devices that are detected as disks). For more information, see Java Hardware (Device) IDs

December 9th, 2021, v2.4.14

License Client

  • Added setOfflineMode to LicenseManager.

License Client and Floating Client

  • Added infoToStore configuration parameters. This enables to fine tune what information you want to send to LS servers during license activation and checking. If storeMachineInfo is off, then this property is ignored, defaults to ALL info. Docs are at the end of configuration optional parameters, see Java License Client for an example for License Client

November 22nd, 2021, v2.4.13

  • Populated lastUsage field after license check (resolves issues when using offline mode after online activation)
  • Added storeMachineInfo configuration parameter (License and Floating Configurations) - false by default. This toggles the collection of additional machine data, which includes:
    • hostname
    • ipAddress
    • macAddress
    • vmInfo
    • osInfo

November 10th, 2021, v2.4.12

All SDK's

  • Added requestTimeout to configurations (in seconds) for API calls, defaults to 10 seconds

October 11th, 2021, v2.4.11

License Client

  • Added fields to LicenseFeature class: allowOverages, maxOverages
  • Added overages logic to increaseConsumption() and increaseFeatureConsumption() methods

September 29th, 2021, v2.4.10

Management SDK

  • Added fields to ProductFeature class: allowOverages, maxOverages, resetConsumption, consumptionPeriod

August 27th, 2021, v2.4.9

All SDK's

  • Added azure environment variable check (WEBSITE_INSTANCE_ID) for offline azure cloud instances
  • Added name and expiryDate for LicenseFeatures

June 29th, 2021, v2.4.8

All SDK's

  • Added shutdownScheduler() method to client SDKs for manually shutting down the scheduled executors used for periodic checks, see Java Advanced Usage.

June 24th, 2021, v2.4.7

All SDK's

  • Added Shutdown hooks to all executor services (used when the periodic check feature is turned on)
  • Added the disableSsl configuration option for rare cases when the app cannot verify LicenseSpring servers certificates. More info in Java Advanced Usage.

June 9th, 2021, v2.4.6

All SDK's

  • Added support for basic authentication when using a forward proxy. Just set proxyUser and proxyPass in any configuration object to use. More info in Java Advanced Usage.

May 20th, 2021, v2.4.5

All SDK's

  • Added support for AWS IMDSv2 node locking (was only IMDSv1)
  • Additional fields to the LicenseData object:
    • allowOverages
    • maxOverages
    • preventVm
    • isFloatingCloud
    • isFloating
    • transferCount
    • floatingInUseDevices
    • floatingInUse
    • resetConsumption
    • consumptionPeriod

You can read the description of each field in the Javadoc & Downloads section.

Floating Client SDK

  • Added on-premise floating server support! Documentation can be found on our Proxy Floating page.

Management SDK

  • Added licenseUsers to the DeviceLicense object (used in the devices via LicenseServices)

April 19th, 2021, v2.4.4

License Client

  • Added ignoreServerExceptions field in LicenseSpringConfiguration - when enabled, it acts as gracePeriodDays (ignoring exceptions if SDK cannot connect to LS servers for License check), but without a time limit

April 15th, 2021, v2.4.3

License Client

  • Increased the maximum allowed for gracePeriodDays to 30 (was 5) and added that information to Java License Client

April 13th, 2021, v2.4.2

All SDK's

  • Added Locale.ENGLISH for query field name serialization (fix for Turkish locale)

Management SDK

  • Changed field in the Device model - "license" is no longer just an ID, now it's an object with: id, license_key

April 9th, 2021, v2.4.1

License Client

  • Fixed an issue when in offline mode to check for clock tampering before setting the lastUsage (this is done during initialisation and on every LicenseManager.getCurrent() call) - you can also manually check for clock tampering in by calling license.localCheck()

April 2nd, 2021, v2.4.0

This release introduces a multitude of changes made in the License Management module. A lot of DTO changes (request and response models). If you are using the License Management SDK, please update to the latest version since older API's are no longer supported or they had method signature changes.

BREAKING CHANGES

Management SDK

  • Removed assignUsers method in OrderService. There is a new method with similar functionality in LicenseService called assignMultipleUsers
  • The field orderItems in the search result of searchOrders method is now empty to cut down on length of the results. The field orderItems is still available for reading while using the getOrder method.
  • BackOfficeLicense has a field product which isn't Long type anymore, instead it's a class BackOfficeLicenseProduct.
  • Removed fields companyName and reference from LicenseUser class.
  • Removed field companyName from AssignUserToLicenseRequest class.

Floating Client SDK

  • Removed field isCloudFloating from FloatingConfiguration class. The field is redunant because floating/floating cloud configurations are separated in two classes: ProxyConfiguration and FloatingConfiguration.

Changelog

All SDK's

  • Added support for a forward proxy! Just set proxyPort and proxyHost in any configuration object to use the forward proxy. More info in Java Advanced Usage
  • Updated oshi and feign libraries to their latest versions (5.6.1 and 11.1) - to fix some bugs on Windows

License Client

  • Added deletion of local license file in checkLicense() method (invoked during initialisation too), in case of license_not_found response (this is the case of deleting a license)

Management SDK

  • 3 new services added as a composition to existing management services:
    • DeviceVariablesService found in LicenseService
    • LicenseCustomFieldsService found in LicenseService
    • ProductCustomFieldsService found in OrderService
  • All 3 (DeviceVariablesService, LicenseCustomFieldsService, ProductCustomFieldsService) have the following methods:
    • search
    • get
    • create
    • update
    • delete
    • paginate
  • Added enableRetrying option to ManagementConfiguration (same functionality as in the other SDKs)
  • New method setUserPassword in LicenseService class.
  • Added prebuild check for releaseDate field in CreateInstallationFileRequest to check if it's in YYYY-MM-DD format.
  • New fields in BackOfficeCustomer class :
    • labels - array of customers labels
    • allLabelNames - name of customers labels
    • labelIds - ids of customers labels
  • New fields in BackOfficeLicense class:
    • licenseUsers - list of all users that use the license
    • activeUpToDateDevices - total number of devices that are currently using the license
    • totalActiveDevices - total number of devices that have status active on the license
    • note - note about the license
    • maxLicenseUsers - maximum number of users that can use the license
  • New fields in LicenseUser class:
    • isStaff - boolean, is user also a part of the company staff
    • subscribedToEmail - boolean, is user subscribed to newsletter
    • acquiredConsent - date when consent was acquired
  • New field in AssignUserToLicenseRequest class, isManager boolean field.
  • New methods in LicenseService class:
    • resetTotalConsumptions
    • setTotalConsumptions
    • assignMultipleUsers
    • unassignUser
    • blacklistDevice
    • resetDevice
  • New methods in OrderService class:
    • searchInstallationFiles
    • getInstallationFile
    • createInstallationFile
    • paginateThroughAllInstallationFiles
  • New filters and sort options in search requests.

September 25th, 2020, v.2.3.2

  • Adapted the caching mechanism in the License class, so that both feature and license consumptions are first checked and then updated. (apriori)

September 22nd, 2020, v.2.3.1

  • Fixed issue with license feature consumption
  • Added utility methods to check presence of features on LicenseData class
  • Fixed wrong javadoc on the LicenseManager class, check method. Added more context for check method.

September 18th, 2020, v.2.3.0

Online documentation

  • Added Javadoc coverage information on online documentation per module & version
  • Added a help page on Java Modules

License Client

  • Added offline de/activation methods with InputStream and OutputStream as parameters
  • Fixed issue with offline activation response loading - wrong file name.

LicenseManager

  • Added patchLicense method to modify product features on existing licenses.
  • Added some javadoc
  • Increased test coverage

September 10th, 2020, v2.2.0

Core SDK

  • Completely restructured online documentation
  • Transitions to hosted Javadoc & Downloads. The javadoc is still available for download via maven.
  • Added node locking options for AWS and Azure Cloud(s)
  • Refactored internal class packages
  • Added a Retryer option, which enables retries of failed requests due to infrastructural reasons (connection issues, server 5xx errors) - up to 4 retries with the longest delay period of 20 seconds. Off by default.
  • Expanded the LicenseSpring Exception model (note: the basic classes still remain, all extend from LicenseSpringException, and are still unchecked)
  • Rewritten @SuperBuilder in configuration classes, to generate javadoc properly
  • Added a delombok process, in order to add javadoc to auto-generated code
  • Higher coverage with javadoc on all Java SDKs

License Client SDK

  • Added a grace period configuration option, which resolves the remote Check services to a local license check with a grace period from 1 to 5 days. Note that the grace period applies only to the Check method and for infrastructural problems (connection, server error). License validation exceptions are still thrown. Default behaviour is off.
  • Added throws LicenseSpringException to every LicenseManager method (unchecked)
  • Enabled negative increments of consumptions - defaults to disabled in configuration.
  • Removed the option to place orders from the Client SDKs.

Floating Client SDK

  • Implemented an automated Shutdown hook background thread. The thread releases activated licenses and deactivates the license. By default the shutdown hook is enabled, and can be disabled
  • Added a per-process (UUID) generated hardware ID strategy which works well with the floating license model.
  • Defined a CheckSubscriber interface which can be used to subscribe to background check events. Default implementation ignores the incoming events.
  • Added a background periodic check caller for all activated licenses. Deactivation removes the licenses from the pool. Period is 1/2 of the floating license duration. On by default.
  • Tested support for multiple licenses and products at the same time. Multiple FloatingLicenseServices required for multiple products, multiple licenses on the same product can be used within the same FloatingLicenseServices instance.

Management SDK

  • Implemented the following methods on LicenseService
    • searchLicenses
    • disableAllLicenses
    • disableLicense
    • getLicense
    • updateLicense
    • assignUser
    • resetLicense
    • enableLicense
    • searchDevices
    • getDevice
    • paginateThroughAllLicenses
    • paginateThroughAllDevices

Implemented the following methods on OrderService

  • searchOrders
  • getOrder
  • exportToCsv
  • assignUsers
  • generateLicenseKeys (migrated from Webhook API)
  • createOrder (migrated from Webhook API)
  • searchProducts
  • getProduct
  • paginateThroughAllOrders
  • paginateThroughAllProducts

July 28th, 2020, v2.1.0

  • Added OSGi support

July 15th, 2020, v2.0.2

  • Removed oshi-demo from dependancy list
  • Support in detecting AWS EC2 instances
  • Added javadoc in Floating SDK

July 15th, 2020, v2.0.0

  • Java SDK was split into 4 different modules
  • Manifest updated and created for each module - support for OSGI was added
  • Added LICENSE file to distribution in jars
  • Added support for floating licenses

Auto-Generated javadoc on deployment - ready for use in iDEs.

June 12th, 2020, v1.9.3

  • Refactored offline license request/response code from LicenseRepository into a separate class
  • Made LicenseRepository an interface SDK users can implement.
  • Added a intitialize() method overload on LicenseSpringManager which accepts the LicenseRepository as the second parameter.
  • Added the default implementation of LicenseRepository, no SDK users will not need to change their implementation, unless building a custom LicenseRepository.
  • Added some checks to prevent entering locking code when there is no need to sync consumptions with LicenseSpring servers.

May 22nd, 2020, v1.9.2

  • Fixed issues with consumptions and caching - the local consumption check was not performed with local state.
  • Removed license deletion on initialization because of server errors. The SDK still deletes the license if the hardware key does not match the one in the license file. The LicenseManager initialize() method can now throw the LicenseSpringException, which the client should handle per use case basis.

May 21st, 2020, v1.9.1

  • Fixed bug with daysRemaining method on License. SUBSCRIPTION license returned max days, instead of CONSUMPTION type.

May 8th, 2020, v1.9

  • Fixed issues with OSHI auto-update version
  • Added request logging options, default is OFF/NONE.
  • Added more tests
  • Refactored code

May 1st, 2020, v1.8

  • fixed issues with Version API
  • implemented local cache for feature consumptions
  • added consumption sync to standard check calls
  • implemented periodic license check - can be enabled via configuration. Period of sync can also be specified.

April 2nd, 2020, v1.7

  • exposed JsonSerialization class

March 29th, 2020, v1.6.

  • Fixed omission of generateTrialKey overload with full customer details
  • Implemented Order model

March 19th, 2020, v1.4.

  • Fixed bug in hardware key generation when no disk is mounted (e.g. VM)

March 13th, 2020, v1.3

  • Added javadoc
  • Changed hardware key generation (might break some builds) - reactivate your license.
  • Fixed minor issues on tracking OS name
  • Fixed major issue with locale support

February 28, 2020, v0.0.1

  • Initial Release of the LicenseSpring Java SDK.
  • There are issues with Offline activation, expected to be resolve by 7th of March, 2020.



Updated 18 Sep 2023
Did this page help you?
PREVIOUS
C++ SDK
NEXT
Java Modules
Docs powered by
Archbee
TABLE OF CONTENTS
Release Notes
September 14th, 2023, v2.8.6
July 10th, 2023, v2.8.3
July 3rd, 2023, v2.8.2
June 26th, 2023, v2.8.1
April 28th, 2023, v2.8.0
April 28th, 2023, v2.7.0
March 17th, 2023, v2.6.2
March 1st, 2023, v2.6.1
February 28th, 2023, v2.6.0
January 30th, 2023, v2.5.9 - BROKEN VERSION
January 17th, 2023, v2.5.8 - BROKEN VERSION
January 16th, 2023, v2.5.7 - BROKEN VERSION
January 10th, 2023, v2.5.6 - BROKEN VERSION
November 4th, 2022, v2.5.5 - BROKEN VERSION
August 10th, 2022, v2.5.4
June 28th, 2022, v2.5.3
June 10th, 2022, v2.5.2
May 18th, 2022, v2.5.1
December 21st, 2021, v2.5.0
December 20th, 2021, v2.4.16
December 14th, 2021, v2.4.15
December 9th, 2021, v2.4.14
November 22nd, 2021, v2.4.13
November 10th, 2021, v2.4.12
October 11th, 2021, v2.4.11
September 29th, 2021, v2.4.10
August 27th, 2021, v2.4.9
June 29th, 2021, v2.4.8
June 24th, 2021, v2.4.7
June 9th, 2021, v2.4.6
May 20th, 2021, v2.4.5
April 19th, 2021, v2.4.4
April 15th, 2021, v2.4.3
April 13th, 2021, v2.4.2
April 9th, 2021, v2.4.1
April 2nd, 2021, v2.4.0
BREAKING CHANGES
Changelog
September 25th, 2020, v.2.3.2
September 22nd, 2020, v.2.3.1
September 18th, 2020, v.2.3.0
September 10th, 2020, v2.2.0
July 28th, 2020, v2.1.0
July 15th, 2020, v2.0.2
July 15th, 2020, v2.0.0
June 12th, 2020, v1.9.3
May 22nd, 2020, v1.9.2
May 21st, 2020, v1.9.1
May 8th, 2020, v1.9
May 1st, 2020, v1.8
April 2nd, 2020, v1.7
March 29th, 2020, v1.6.
March 19th, 2020, v1.4.
March 13th, 2020, v1.3
February 28, 2020, v0.0.1
Docs powered by
Archbee