EasyXLS

Why do I get "Warning: the Graphics can not be determined"

The following warning and also an error might occur at runtime when using EasyXLS Excel library for Java:

Warning: the Graphics can not be determined

or

java.lang.InternalError: Can't connect to X11

java.awt.HeadlessException

Reason: No graphics is installed on UNIX system or headerless mode is enabled

The mentioned errors might occur on UNIX platforms.

The graphics is used to compute the column width or the row height. The dimensions are computed according to the graphic environment installed on the computer. If no graphics (like X11 graphics) is installed or the headerless mode is used then you will get the exception.

Possible solution #1: Set column width and row height manually

If no column width or row height is specified, they are automatically computed based on computer installed graphics. You can manually set the column width and the row height. This way the automatic columns resize no longer takes place.



Possible solution #2: Do not use headless mode

Run your application without using the headless mode:

-Djava.awt.headless=false

Possible solution #3: Install a graphic library

The X11 graphics or any other graphic library can be installed on the machine.

Possible solution #4: Turn off display errors

If the warning is just an annoying message shown on the console, you may suppress the error messages to be display.



Contact us for any other reasons

If none of the above, contact us at support@easyxls.com with details about your application configuration and the full error message.


Available for: Professional, Excel Writer, Excel Reader, Express Excel Writer
Go to top

EasyXLS Excel libraries:

Java
Java Excel Library
full Java version to import, export or convert Excel files
Java Excel Writer
Java version to create and export Excel files
Java Excel Reader
Java version to read and import Excel files
Java Express Excel Writer
limited Java version to create and export Excel files in predefined formats
Download EasyXLS™ Excel Library for Java

File formats:

MS Excel 97 - 2003
MS Excel 2007 - 2019
MS Excel 2021
Office 365
XLSXXLSMXLSBXLS
XMLHTMLCSVTXT