How to embed Licence File in Application

Hi.

Please let me know How to embed License file in Application instead of sending files to customers site.

Sunil

Hi Sunil,

Thanks for your inquiry.

Well, I think you may try some encoding / decoding options using Java / .NET APIs or utilze some other means / tools to protect your license file for a Java /.NET program.

Thank you.

Hi Amjad.

You are Right. I want to protect License file and also to avoid acidently delete license file by customer and also application maintenance free.

License license = new License();

license.setLicense(myStream);

( here i am able to create string from License file , can setLicense will automatically convert to inputStream. ).

Please suggest.

Sunil

Hi Sunil,

Well, I think you can archive your lic file together with your application classes into single jar and use Class.getResourceAsStream() to load the lic file. So, you may archive the license file into your own application jar file to protect it.

( here i am able to create string from License file , can setLicense will automatically convert to inputStream. ).

I think you can build the InputStream by yourself using your own code, e.g..,

ByteArrayInputStream bais = new ByteArrayInputStream( licStr.getBytes());

Thank you.

Thanks Amjad.

Please correct :

Creating String from License File.

Paste in Application Class File.

ByteArrayInputStream bais=new ByteArrayInputStream(str.getBytes());

License.setLicense(bais);

This is not working.

Thanks in Advance.

Sunil

Hi Sunil,

Could you elaborate whether you want to secure your license file or you are just unable to set your license file using streams. If you want to secure your license file, you may simply archive the license file with your application .jar file (as suggested in my previous post) for your requirements. If you are unable to set/use your license file, kindly paste your complete sample code here and mail us your license file. To post your license file, please follow the steps given @: http://www.aspose.com/corporate/purchase/faqs/send-license-to-aspose-staff.aspx

We will figure out your issue soon.

Thank you.