0
0

More than 1 year has passed since last update.

【Linux】Linux Serverのawt使用不可の件

Posted at

LocalPCではエラーなく運営できるが、サーバ-に乗せるとエラー(java.lang.NoClassDefFoundError: sun/awt/X11GraphicsEnvironment)が発生する場合があります。
OSによる設定の違いがエラーの原因で、
下記の中のどちらかを選び設定すれば、解決できます。

【プログラム内に組み込み】
System.setProperty("java.awt.headless", "true");

【Serverの設定を変更】
catalina.shファイルのCATALINA_OPTS部分にオプションを追加する。
-Djava.awt.headless=true

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0