Java - AWT 从 1.4 到 1.5 的差异(适用于 Unix 和 Windows)

发布于 2024-07-11 22:03:17 字数 510 浏览 8 评论 0原文

这是参考我的问题: 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

∞觅青森が 2024-07-18 22:03:17

我没有全部读完,但这里有关于 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.

纵性 2024-07-18 22:03:17

我在没有头的系统上运行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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文