NSD1177 Getting error message: "Could not initialize class sun.awt.X11GraphicsEnvironment" on Linux or Unix

Fact

  • Nordic Edge One Time Password Server

  • Nordic Edge Automatic Account Manager

Situation

When running AAMService or OTPServer on Linux or Unix and getting the following error message:
java.lang.NoClassDefFoundError: Could not initialize class sun.awt.X11GraphicsEnvironment

Solution

Add the Java parameter -Djava.awt.headless=true to the script file that starts the application. 

Example:
Edit the AAMService or the OTPServer file with a texteditor, locate the following line:

   options="$jitinvoc $options"

add Djava.awt.headless=true just after the " and before the $jitinvoc. Make sure there is a space character after =true

   options="-Djava.awt.headless=true $jitinvoc $options"

Restart the service


Disclaimer

The origin of this information may be internal or external to Nordic Edge™. Nordic Edge™ makes all reasonable efforts to verify this information. However, the information provided in this document is for your information only. Nordic Edge™ makes no explicit or implied claims to the validity of this information. Any trademarks referenced in this document are the property of their respective owners.

Nordic Edge Support – www.nordicedge.se

Comments are closed.