Java - AWT 从 1.4 到 1.5 的差异(适用于 Unix 和 Windows)
这是参考我的问题: java.awt.HeadlessException Applets not displayed 。
系统管理员提出了下一个问题。 他们问:
“为什么 java1.5 现在需要在 tomcat 中显式导出 DISPLAY,而 java1.4 不需要?”
那么 java1.5 中发生了什么变化导致它在没有显式导出 DISPLAY 的情况下抛出 java.awt.HeadlessException 呢?
java1.5 中 applet 的工作方式有变化吗? Sun 是否改变了 java1.5 中 AWT 或 Swing 的内部工作方式? java1.4 能够看到在 Unix 上运行的 xvfb 库,但 java1.5 在没有显式导出 DISPLAY 的情况下无法看到的原因是什么?
This is with reference to my question: java.awt.HeadlessException Applets not displayed.
There is a next question that has come up from the Sys Admins. They are asking -
"Why does java1.5 now requires the explicit export DISPLAY in tomcat at all when java1.4 did not?"
So what has changed in java1.5 which is causing it to throw a java.awt.HeadlessException without the explicit export DISPLAY?
Is there a change in a way applets works in java1.5? Has Sun changed internal working of AWT or Swing in java1.5? What is the reason that java1.4 was able to see the xvfb libraries running on Unix but java1.5 cannot see without an explicit export DISPLAY?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我没有全部读完,但这里有关于 1.5 和 1.4 之间与 headless 相关的变化的相关信息。
支持“无头”Java
https://bugs.java。 com/bugdatabase/view_bug?bug_id=4281163
Java 中的 AWT 增强
http://java.sun.com/j2se/1.5.0/docs/guide/awt/AWTChanges.html#headless
我希望有所帮助。
I didn't read it all, but here are the relevant information about the changes between 1.5 and 1.4 related to headless.
support "headless" Java
https://bugs.java.com/bugdatabase/view_bug?bug_id=4281163
AWT Enhancements in the Java
http://java.sun.com/j2se/1.5.0/docs/guide/awt/AWTChanges.html#headless
I hope that helps.
我在没有头的系统上运行tomcat,因此根本没有X服务器,并且我不需要导出DISPLAY。
I run tomcat on a system that doesn't have a head, and therefore doesn't have an X server at all, and I don't need to export DISPLAY.