License cannot be applied

Hello, we just bought Aspose.Words for java license and we want to use it on an oracle database. I created a java class containing the two commands you provided us but I am getting the error: “Package Aspose.Words does not exist”. I put the lic file into the CLASSPATH variable of the database, with no luck. What should we do? Thanks, Angelina Sokratous

Also, the commands we used are:

[Java]

License license = new License();
license.setLicense("Aspose.Words.lic");

What is the procedure to apply the xml license file into the oracle database?

Thanks,
Angelina

Hi Angelina,
Thanks for your request. First of all you should add a reference to Aspose.Words JAR. com.aspose.words.License class is defined in this JAR. Since you did not added the reference you get this compilation error.
Best regards,

Hello Alexey,

thanks for your response. I add the: import com.aspose.words.* in my java class, but now although the License class is recognized, since it exists in the com.aspose.words package, the setLicense method is not recognized. I tried to add the .lic file into the JAR I used… but with no lack.

Where should I put the .lic file in order for the setLicense method to be recognized?

Thank you in advance,
Angelina

Hi Angelina,
Thanks for your request. the license file can be located anywhere where you application can access it. Please see the following link for more information:
https://docs.aspose.com/words/java/licensing/
In your case the problem occurs because you did not add reference to Aspose.Words JAR. I understand that you added imports com.aspose.words, but I suppose it is not recognized. It is not recognized because you did not add a reference to JAR.
http://www.wikihow.com/Add-JARs-to-Project-Build-Paths-in-Eclipse-(Java)
Best regards,

Hello again,

the thing is that we are not using any IDE to apply the license like you describe. We want to apply it on an oracle database… in which we have an oracle package which calls a stored java procedure.

Before bying the licence I used the loadjava function to upload the Aspose.Words.jdk15.jar file to the database. Now, I used the loadjava again to upload the Aspose.Words.lic but the setLicense method is not recognized.

Any ides on how to apply the .lic file to the database?

Thanks,
Angelina

Hi Angelina,
Thanks for your request. You do not need to use loadjava to load the license file. You have to use loadjava to load Aspose.Words Jar as you did before and in the code just apply the license specifying a path to the license file.
Best regards,