Set-up License for Aspose.Words for Java API before Converting Word Documents

Hi may I know what are the things needed in order to set the license in java, I read something about this, License license = new License(); license.setLicense(“Aspose.Words.Java.lic”); But I want to know where to add this? what else do I need to add in the code? Is there any setup needed like adding files etc?
I want to know where to add this? what else do I need to add in the code? Is there any setup needed like adding files etc?

@engela,

You only need a license file with .lic extension. You can then place this file any where on disk and then provide path in License.setLicense method. Make sure setLicense method is executed before you instantiate any Document class object. For complete details, please refer to the following section of documentation:

@awais.hafeez
we are trying to add it on the dev server, can we put it anywhere there? as long as we have the path… the installation process will be done by the maven using the pom dependencies right? there’s no other installation process in the dev server to be done? Let me know if my understanding is correct. Thank you.

As pose.words Maven Project (Wizard)
. * Creates Maven project to use As pose.Words for Java. Please follow New -> Project -> Maven-> As pose.Words Maven Project.
. * Lets you copy the downloaded Code Examples into your project. Please follow New -> Other -> Java -> As pose.Words Code Example

@awais.hafeez
we are trying to add it on the dev server, can we put it anywhere there? as long as we have the path… the installation process will be done by the maven using the pom dependencies right? there’s no other installation process in the dev server to be done? Let me know if my understanding is correct. Thank you.

@engela,

Yes, you can place license file at any location inside server. Please make sure that your app has read/write permissions to the directory where you placed the license file in. Also, to install Aspose.Words via Maven, please refer to following section of documentation:

Once the Aspose.Words dependency is added in project, other than that there is no further installation process. Please let me know if I can be of any further assistance.

Please make sure that your app has read/write permissions to the directory where you placed the license file in. - how do we do this? - Sorry to ask a lot, not really familiar with the process

@engela,

Please open the folder of your application and place the license file inside the same home/root folder of your application. Then supplying the path in setLicense method should cause no problem. Regarding file and folder permissions, you can search on Google according to your OS e.g. the following page explains how to do it in Windows 10:

https://www.thewindowsclub.com/change-files-and-folders-permissions-in-windows-10