View Full Version : How to load license from string

07-28-2010, 10:44 AM
I'm using the 10.8 version of the Java API for FlexNet Publisher. The documentation states:

The following forms can be used to specify the license path:
- A single file ...
- port@host ...
- A redundant server configuration ...
- A license certificate in a string. Precede the license certificate string with the string
and end it with the string

I've written the following Java code to do this:

protected com.macrovision.flexlm.License loadFlexlmLicenseFromString(String licenseStr) throws LicensingException {
com.macrovision.flexlm.License flexLicense = null;

try {
String licenseSource = FlexlmConstants.LICENSE_STRING_PREFIX
+ licenseStr

log.info("loading flexlm license string");
flexLicense = new com.macrovision.flexlm.License(myFeature, licenseSource, myVendorInfo, null);

return flexLicense;
catch (Exception e) {
log.info("caught exception loading flexlm license: ", e);
throw new LicensingException(e);

However, this always returns the following error:

com.macrovision.flexlm.FlexlmListException: Error List Returned (-513,7) ; Error List Returned (-513,4052) ; Can't Find License File (-1,4042)

Does anyone know what is the proper way to load a license file from a String?

And no, using a newer version is not an option.

07-29-2010, 05:33 PM
(Follow-up here.)