Free Support Forum -

Apply license for Aspose Words in JBoss

I’m having a problem getting Aspose Words to recognize it’s license in a JEE application running in JBoss. I have the license in the META-INF/lib folder along with the Aspose Words jar. The license file is making it into the Jar I deploy on JBoss but license.setLicense throws an exception because it can’t find the license file. Has anyone got experience of packaging Aspose Words for a JEE application?


Answering my own question - I loaded the license as a stream:

License license = new License();
try {
ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
InputStream licenseStream = classLoader.getResourceAsStream(“META-INF/lib/Aspose.Words.lic”);
license.setLicense(licenseStream); //“Aspose.Words.lic”);

Seems to be working OK…

Hi Peter,

Good to know that you have found the solution. Please feel free to contact us in case you have further comments or questions.

Best Regards,