参考网址:http://stackoverflow.com/questions/860187/access-restriction-on-class-due-to-restriction-on-required-library-rt-jar There's another solution that also works. I found it on this forum: 1.Go to the Build Path settings in the project properties. 2.…
转自:http://my.oschina.net/xiangtao/blog/28441 网站验证码突然无法显示,并报如下错误. Caused by: java.lang.NoClassDefFoundError: Could not initialize class sun.awt.X11GraphicsEnvironment Caused by: java.lang.InternalError: Can't connect to X11 window server using 'localh…
问题描写叙述 遇到的问题是在weblogic环境,应用在上传图片的时候报Could not initialize class sun.awt.X11.XToolkit 错误. 详细错误例如以下 17:57:02 [AWT-EventQueue-2] DEBUG - Leaving class nc.ui.hi.psndoc.action.SavePsndocAction.actionPerformed Exception in thread "AWT-EventQueue-2" jav…
exception java.lang.NoClassDefFoundError: Could not initialize class sun.awt.X11GraphicsEnvironment CreationTime--2018年9月5日17点09分 Author:Marydon 1.情景展示 在linux服务器下,运行的tomcat,通过java绘制图片的时候报错信息如下: 在本地测试却没有问题 2.原因分析 Java服务器处理图形元素,这些API需要运行一个X-server以便…
一.问题 javaweb项目,登录的时候有个图片验证码的功能.在Windows本地测试能够正常显示,部署到Linux上就不行了.报错如下: org.springframework.web.util.NestedServletException: Handler processing failed; nested exception is java.lang.NoClassDefFoundError: Could not initialize class sun.awt.X11FontManage…
前几天发现tomcat提示 Could not initialize class sun.awt.X11GraphicsEnvironment 问题.以为不验证,就没太关注,今天发现,有同事提示了个bug,验证码刷不出来,查看日志,报了很多这个个错误.才意识到问题的严重. 网上找了找资料:共两种解决方案 1:http://love-love-l.blog.163.com/blog/static/21078304200908595214/ 2:http://tcrct.iteye.com/blo…
异常信息: Caused by: java.lang.NoClassDefFoundError: Could not initialize class sun.awt.X11GraphicsEnvironment Caused by: java.lang.InternalError: Can't connect to X11 window server using 'localhost:10.0' as the value of the DISPLAY variable. 验证码用到Java s…
环境:Oracle Linux 6.4,JDK1.6,Weblogic11g 在通过java.awt生成图片验证码时,提示: Could not initialize class sun.awt.X1 解决方法: 在weblogic启动脚本中增加: export JAVA_OPTIONS="-Djava.awt.headless=true" 重启服务器问题解决.…