Hi,
I am getting this error when we deploy the app on our linux server. The app runs on a tomcat instance (tomcat6) and java 1.6. This works fine in the windows development box. Can anyone help?
<<
java.awt.HeadlessException:
No X11 DISPLAY variable was set, but this program performed an operation which requires it.
at sun.awt.HeadlessToolkit.getScreenResolution(HeadlessToolkit.java:203)
at com.aspose.cells.b.a.b.i.h(Unknown Source)
at com.aspose.cells.b.a.b.g.a(Unknown Source)
at com.aspose.cells.ou.a(Unknown Source)
at com.aspose.cells.ou.a(Unknown Source)
at com.aspose.cells.ou.a(Unknown Source)
at com.aspose.cells.Worksheet.autoFitRows(Unknown Source)
Thanks
Tom
Hi,
Thanks for your posting and using Aspose.Cells for Java.
Please download and use the latest version:
Aspose.Cells for Java 7.3.2
Please try setting java.awt.headless=true before running your code and see if it gets crashed or not.
Please not the red line below.
Java
CellsHelper.setFontDir(fontDir);
Workbook book = new Workbook("foo.xls");
//Rest of your code.
//........
book.save("foo.pdf");
Hi Shakeel,
We did exactly that. The version we were using was the trial version before we got the license. It was upgraded to the latest version from the portal and it now works.
Thanks
Tom
Hi,
Thanks for your feedback.
It’s good to know that your issue is resolved with the above settings.
Let us know if you face any other issue, we will be glad to help you.