JavaLicense is a license validation and management solution for your Java projects. It enables you to check, validate, and manage licenses within your Java applications.
public static void main(String[] args) {
try {
// License object creation
License license = new License("dailyreward", "https://geik.xyz/app/api/license2.php?product={product}");
// License check
License.LicenseResponse status = license.run();
// Checks if server has license or not
if (status.isHasLicense()) {
// Code block for license found situation
System.out.println("License found!");
}
else
// Code block for license couldn't be found situation
System.out.println("License couldn't be found");
// Exceptions
} catch (ConnectionFailureException e) {
// When connection fails, throws this exception
System.out.println("Connection failed to remote server.");
// When response not equal to 500, throws this exception
} catch (ResponseCodeException e) {
System.out.println("Response code is not correct, check api server!");
} catch (IOException e) {
throw new RuntimeException(e);
}
}
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>com.github.poyrazinan</groupId>
<artifactId>JavaLicense</artifactId>
<version>1.4</version>
<scope>compile</scope>
</dependency>
</dependencies>
repositories {
maven { url 'https://jitpack.io' }
}
dependencies {
implementation 'com.github.poyrazinan:JavaLicense:1.4'
}
You can find jar on releases.
- Web API for storing licenses and check. Suggest you my api
- If you'd like to provide feedback or contribute to the project, please open an issue on the GitHub repository or submit a pull request.
- JSON
- Version: 20231013
- Official Website
- Jetbrains Annotations
- Version: RELEASE
- Github
- Lombok
- Version: 1.18.26
- Official Website
This project is licensed under the MIT License. For more information, please see the LICENSE file.