Question

i am trying to protect my software with a classic serial key the user enters at start. I built something like that for my software some while ago, but our client now wants to handle the licenses himself, thus being able to blacklisting some serial keys.

The idea is that the software connects itself every week or so to validate itself with our servers. After half a year without a successfull validation the software is blocked.

Well i'd like to use some library for that (writing it myself would be possible but i feel like not reinventing the wheel is a good idea at license validation).

Yesterday i played around some hours with license4j but it seems like the java runtime API is solely based on either the License4j proper servers or the floating server activation pattern. The LicenseValidator class doesn't give you methods for any other validation way. What i really want is a basic onlince license key validation - maybe coupled with some "send me back some information about the license" - maybe like enabled features or stuff. That would be nice.

Any ideas?

Was it helpful?

Solution

After looking through the downloaded javadocs (not the ones online) i found out that license4j indeed has such a method, but does not mention it in the documentation online. Sorry for that.

The used method was this one:

License license = LicenseValidator.validate( key, publickey, productID, productEdition, productVersion, null, null, "YOURSERVERNAME:PORT/algas/validateobk", new DefaultOnlineLicenseKeyCheckTimerHandlerImpl("Online License Key can not be obtained.", false));

OTHER TIPS

Online License Key floating over internet is a concurrent usage license model. The license can be validated from any computer but total concurrent usage cannot exceed defined quantity.

If you want to validate license online but always on the same computer, you should use activation feature and re-activate license each time your software starts. So it will be bound to a single computer.

Disclosure: I work for License4J.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top