1. 程式人生 > >關於使用Xshell遠程連接啟動tomcat導致圖片不顯示,報錯Could not initialize class sun.awt.X11GraphicsEnvironment解決方案

關於使用Xshell遠程連接啟動tomcat導致圖片不顯示,報錯Could not initialize class sun.awt.X11GraphicsEnvironment解決方案

graphics 關於 功能 image 可能 com http init shell使用

如果您是使用xshell遠程啟動tomcat,導致二維碼、驗證碼,頭像等各種圖片不顯示,並且打開圖片鏈接報錯Could not initialize class sun.awt.X11GraphicsEnvironment的話,那麽問題原因很可能是Xshell使用x11轉發連接到某個地址了。
那麽原因找到了,解決方案就出來了——關閉x11轉發功能。
對於xshell4或者xshell5的話就是在當前鏈接的“屬性”——>“隧道”——>“x11轉移”,勾掉下面的“轉發x11連接到”。
技術分享圖片

關於使用Xshell遠程連接啟動tomcat導致圖片不顯示,報錯Could not initialize class sun.awt.X11GraphicsEnvironment解決方案