We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Setting the license with its simple file name

I have a copy of a Aspose.Total license in the same folder as the Aspose.Cells .jar file.

When setting the license with the method setLicense() as an absolute path everything works.

However, when the license is specified as a simple file name it is not found.

I tried a similar configuration for Aspose.Words and there it works even with the simple name.

Something is wrong either with the documentation or the implementation of Aspose.Cells.


Thanks for your posting and using Aspose.Cells for Java.

I have tested this issue with the following approach and found that license is being set properly. I tested it with the latest version: Aspose.Cells
for Java v8.0.0.1

Generally, the license file name is like “Aspose.Total.Java.lic” but you can rename it anything e.g you can name it “Test”. Now if you place it in C:\myDir folder, then the full path to license file will be C:\myDir\Test and you can set it like this

com.aspose.cells.License lic = new com.aspose.cells.License();

But suppose, you want to set it like this without giving absolute path

com.aspose.cells.License lic = new com.aspose.cells.License();


Now, you must place your license file namely “Test” in the current working directory. You can find your current working directory like this.

File f = new File(“something”);

It will print the absolute file path which would be something like this


It means, your current working directory is F:\Eclipse-Workspace\Helios\AsposeTest</b>

Now you should place your license file in this directory and Aspose.Cells will be able to locate the license file without you giving the full license path


1 - You can rename your license file any thing.

2 - If you do not give the full path, then you must place license in current working directory which you can find using the above code.


according to the documentation at “http://www.aspose.com/docs/display/cellsjava/License”, the license file is searched as aboslute path or in the folder where the .jar resides. There is no mention about the current directory.

So the documentation seems incorrect. Moreover, this behavior is different from the Aspose.Words component, which indeed searches the license file in the same folder as the one that contains the .jar.


Thanks for your feedback and using Aspose.Cells.

You are right about the documentation. We will look into this matter further and if the documentation or Aspose.Cells behavior need to be fixed, we will do it. Meanwhile, you could set the license with the approach I mentioned.

Thanks for the quick response times.

If you intend to modify the software, I would personally prefer and thus suggest a behavior similar to the one of Aspose.Words, i.e., to search in the same folder as the one of the .jar

In the meantime I’ll use an absolute path to the license file.

Best regards


Thanks for your posting and using Aspose.Cells.

We have logged this issue in our database for investigation. We will support searching the license file according to the Aspose.Cells Jar location. Once, there is some fix or other update for you, we will let you know asap.

This issue has been logged as CELLSJAVA-40782.

The issues you have found earlier (filed as CELLSJAVA-40782) have been fixed in this update.

This message was posted using Notification2Forum from Downloads module by Aspose Notifier.

Your reaction times are simply fantastic!

This is what I call a professional way of doing :wink:

Thank you very much


Good to know that your issue is resolved by the new version/fix. Hopefully, it will work fine accordingly for your needs. Feel free to contact us any time if you have further comments or find any other issue or queries, we will be glad to help you soon.

Have a good day!