To begin using the cloud license server, you must first
create an
account. The platform offers a fully functional trial option that is available for one week,
allowing you to explore its features without any initial commitment.
After successfully logging into your account, you will find three example products provided by the server.
Each of these products comes with 10 licenses that you can use for testing purposes. You have the option to
either utilize one of the existing example products and its associated licenses or, if you prefer, you can
create your own product along with a set of licenses
tailored to your specific needs.
Once you have set up your product and licenses on the server, the next step is to integrate the licensing
library into your project by using build tools like maven or gradle. Maven Central includes licensing
library:
license4j @ Maven
Central
Finally, you will need to include the appropriate code within your project to validate the licenses you have
created. For guidance on how to implement this, you can refer to the examples available on GitHub at
github.com/license4j. These resources will provide you with
practical code snippets and detailed
instructions to assist you in successfully integrating licensing into your application.
The following example provides a Maven dependency and associated code for the validation of a software
license. Copy the code into your application, replace the product hash code and license key with your
created ones, and execute the program.
<dependency>
<groupId>com.license4j</groupId>
<artifactId>licensing-library</artifactId>
<version>5.0.1</version>
</dependency>
// Use builder to build the License object
// The only required parameter is product
// hash code given on web-application
// Products page
License.getInstance().getBuilder()
.product("product-hash-code")
.build();
// Validate the license key
License.getInstance()
.validate("12345-12345-12345-12345");
// Check the status to see whether it is valid or not
License.getInstance().getStatus();