We want to use aspose api in our java utility tool which is scheduled to run every 1 min.
As per license guide it says,every time the code is called we have use license.setLicense .
Please guide us to install it one time.We dont want to set License everytime java utility tool is called.
Hi, @Priya05!
Thank you for using Aspose.Imaging.
But let me know what is the problem with setting a license every start your utility. setLicense works fast.
As a solution, you can run your utility only once as a service that performs some actions every minute. In this case, you need to set a license only once when your service is starting.
Hi @samer.el-khatib4aspose,
Is there a way to move license from one to another because my code is in one server so while coding I attached it in that server but now I want to move my code in Production server. I think while moving the license is not getting moved and hence I am facing this issue.
@Priya05
I am not sure I understood your situation completely. But you can place the license as a resource inside your Java utility (inside jar). In this case, your license will be always along the code. But you should take into account that in case of stealing your utility the license is stolen too.
The second option is to place the license in the shared folder within your local network and load it right from there.
@evgsidenko,
While exporting the jar file, we are not exporting the license but we keeping the license inside config folder on the same server where the jar file is being called.It same as second option you have given.But still the license is not getting called or is taking long time to load that I am not sure because it never shows next logger line to be printed in the logs and method is never getting ended.
Please help us resolve this issue as it would impact production environment to stop processing documents.
Thanks and Regards,
Priya
@Priya05 Please clarify what do you mean by “the license is not getting called”? Do you mean that the lic.setLicense(“Aspose.Imaging.Java.lic”); method processing time is too long and the process is aborted? Or setLicense is not even called? Or is it something else? Which method is never getting ended?
@Priya05 Also please extend the try-catch scope by moving the try right after the LOGGER.info(“Starting DMSBatchImportMethod”); line to see if there is any exceptions on loading properties file or setting license step.