Error while trying to apply Aspose.Word for Java license

Hi
We had just purchased for Aspose.Words for Java. Then I tried to test the license file but I got the error message below.
Here is the snippet java code, I am using for test the license file.

License license = new License();
File f = new File("D:\\Softwares\\Aspose Trial 11.7 .Words.Java\\purchased_license\\Aspose.Words.lic"); 
license.setLicense(new FileInputStream(f)); // ---> The exception was thrown from this line.
[Fatal Error] :1:1: Content is not allowed in prolog.
org.xml.sax.SAXParseException: Content is not allowed in prolog.
at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(Unknown Source)
at javax.xml.parsers.DocumentBuilder.parse(Unknown Source)
at com.aspose.words.HH.V(Unknown Source)
at com.aspose.words.License.setLicense(Unknown Source)

What could be the problem?
Now I am using Aspose.Words for java version 11.7.

Hi Smith,

Thanks for your inquiry. I was unable to reproduce this exception on my side using Aspose.Words for Java version 11.8.0. Could you please upgrade to latest version and let us know how it goes on your side? You can download it from the following link:
https://releases.aspose.com/words/java

In case, the problem still remains, please post your license file via email to me. I will investigate the issue on my side and provide you more information. Moreover, in order to post your license file to me, please follow the instructions provided in the following link:
https://forum.aspose.com/t/aspose-words-faq/2711

Best Regards,

Hi Awais,
Could you recieve my license file, I’ve just sent it to you?
Best Regard,
Smith

Hi Smith,

Thanks for sharing your license file via email.

I have checked your license file, it is a corrupted file which does not have anything documented in it. So, when you try to set this license file in your code, you got this error. For your information, the valid license file is a plain XML file that contains details, such as the product name, number of developers it is licensed to, subscription expiry date etc. Either you did not download it correctly or you did not receive it fine.

Please post a query at Aspose.Purchase forum below:
https://forum.aspose.com/c/purchase/6 and demand a valid license file. one of our sales staff member will help you soon.

Best Regards,

Hi Awais,
Thanks for your investigation. I 've asked purchaser to send me the license file again this time I could see the xml content of the file. Now I can use the license file in my code without any problem.
Thanks for your supports.
Best Regards,
Smith Torsahakul

Hi Smith,

Thanks for the additional information. It is perfect that you managed to resolve the problem on your side. Please let us know any time you have any further queries. We’re always glad to help you.

Best Regards,