java中的纯轻量级应用 [英] Pure lightweight application in java

查看:37
本文介绍了java中的纯轻量级应用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以在 Java 中编写纯"轻量级代码?Swing 是轻量级的,但即使它具有重量级的组件,如 JWindow、JFrame、JDialog 和 JApplet.所以即使是 Swing 应用程序也不是 100% 独立于底层操作系统

Is it possible to write "pure" lightweight code in java? Swing is lightweight but even it has heavyweight components like JWindow, JFrame, JDialog, and JApplet. So even Swing applications are not 100 percent independent of the underlying OS

是否有可能在 Java 中拥有完全独立于底层操作系统的轻量级应用程序以进行图形显示?有没有可能用java写这样的代码?

Is it possible to have lightweight applications in java which are completely independent of the underlying OS for graphics display? Is it possible to write such code in java?

推荐答案

嗯...是的,那些100% 独立"于操作系统.

Um...Yea, those ARE "100% independent" of the OS.

至少到了所有 JVM 都必须支持它们的程度.

At least to the point that all JVMs must support them.

我想我不明白你所说的 100% 独立是什么意思.从本质上讲,Swing 只需要访问核心窗口管理器和一个 blitter,尽管它显然可以(并且确实)使用的远不止这些.

I guess I don't understand what you mean by 100% independent. At it's core, Swing needs little more than access to the core window manager and a blitter, though it obviously can (and does) use much more than that.

简单地说,移植 JVM 的一部分包括移植 Swing 所需的核心图形功能.某些端口比其他端口更好地利用操作系统,但在高级 Swing 级别,您通常不关心这一点.

Simply stated, part of porting the JVM includes porting the core graphics capabilities required by Swing. Some ports leverage the OS better than other, but at the high level Swing level, you generally aren't concerned about that.

这篇关于java中的纯轻量级应用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆