The previous few days found that Tomcat prompted Could not initialize class sun.awt.X11GraphicsEnvironment problem. Thought does not verify, did not pay much attention, found today, a colleague prompted a bug, verification code can not be brushed out, view the log, reported a lot of this error. Only to realize the seriousness of the problem.
Find information online: A total of two solutions
1:http://love-love-l.blog.163.com/blog/static/21078304200908595214/
2:http://tcrct.iteye.com/blog/507953
Article excerpt
Programme I
Modify ${tomcat_home}/bin/ to add a phrase "catalina_opts=-djava.awt.headless=True
Programme II
Modified ${tomcat_home}/bin/catalina.sh (Windows modify Catalina.bat) found -djava.io.tmpdir="$ Catalina_tmpdir"-djava.awt.headless=true
Modify the Save and restart can, at this time, if you use remote login to modify, you may need to modify the catalina.sh This file permissions, use the Tomcat\bin directory input chmod 777 catalina.sh modify it!
Java: Hint could not initialize class Sun.awt.X11GraphicsEnvironment