javaJava API

SunLicenseAPI Integration Guide

Prerequisites

  • Java 8 or higher

  • SunLicense Server API URL

  • Product ID

Project Setup

1. Configure Maven Repository

Add the Sundevs repository to your pom.xml:

<repositories>
    <repository>
        <id>sundevs</id>
        <name>Sundevs Repository</name>
        <url>https://repo.hapangama.com/releases</url>
    </repository>
</repositories>

2. Add Dependency

Include the SunLicenseAPI dependency in your pom.xml:

Basic Integration

1. Initialize the API

Create an instance of SunLicenseAPI with your license details:

circle-exclamation

2. Implement License Validation

Add basic license validation to your application:

Advanced Configuration

Custom IP Address Configuration

You can manually set the IP address for validation:

Loading License from File

For production environments, load the license key from a file:

Custom HWID You can write your own implementation for HWID and pass it with the request.

Troubleshooting

Common issues and solutions:

  1. Connection Issues

    • Verify API endpoint URL

    • Check network connectivity

    • Confirm firewall settings

  2. Validation Failures

    • Verify license key format

    • Check product ID is correct

    • Confirm IP address restrictions

  3. Configuration Problems

    • Ensure Java version compatibility

    • Check dependency versions

Remember to replace placeholder values (YOUR-LICENSE-KEY, YOUR_PRODUCT_ID, YOUR_API_URL) with your actual values from your SunLicense account.

Last updated