如何分发AWTUtilities [英] How to distribute AWTUtilities

查看:186
本文介绍了如何分发AWTUtilities的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近看了关于推进,描述了如何实现本地透明与纯Java像​​素博客文章。所需的类驻留在com.sun.awt即com.sun.awt.AWTUtilities。

I recently read the blog posts on Pushing Pixels that describe how to achieve native transparency and translucency with pure Java. The needed classes reside on com.sun.awt namely com.sun.awt.AWTUtilities.

我想知道我怎么可能包括所需的类(不只是这一个)进入我的发行版,因为类是仅当您安装了JDK,你经过那里启动JVM。所以,我的程序的用户将不会有所需的类来运行我的程序。

I was wondering how i could include the needed classes (not just this one) into my distro since the classes are available only when you have a jdk installed and you start the jvm through there. So the users of my program will not have the needed classes to run my program.

任何想法?

推荐答案

AWTUtilities,作为包意味着是一个实现封装,可随时更改。我不认为这是从技术和法律观点分发类是一个好主意。

AWTUtilities, as the package implies is an implementation package and is subject to change. I don't think it is a good idea to distribute the class from both technical and legal viewpoints.

从技术上讲,com.sun.awt.AWTUtlities势必对其他类和内部实现细节,具体到Java 6的U10及以上可能未知依赖关系(的在它出现释放)。这的未知依赖的角度必然要装水,因为绘画和图形,需要在一些本地的实现也会改变。

Technically, com.sun.awt.AWTUtlities is bound to have possibly unknown dependencies on other classes and internal implementation details, specific to Java 6 u10 and above (the release in which it appeared). This unknown dependency angle is bound to hold water, since painting and graphics will require changes in some of the native implementations as well.

其次,这势必会在Java 7的改变,因为只有释放Sun还没有做出java.awt.AWTUtilities的释放与透明度的支持,是因为他们不更改公共API除了在主要版本

Secondly, this is bound to change in Java 7, since the only release Sun hasn't made a release of java.awt.AWTUtilities with support for transparency, is because they do not make changes to public APIs except in major releases.

IANAL,但我不认为这是明智的,而不必跑过去一律师从事摇匀软件的行为。此外,顾客不喜欢在他们的系统有任何软件不支持的部署思路。

IANAL, but I do not think it is wise to engage in the act of redistributing software without having run past a lawyer. Besides, customers do not like the idea of having an unsupported deployment of any software in their systems.

更新

从6u10中所有Sun的JRE(不只是的JDK)起配com.sun.awt.AWTUtilities,所以动作最简单的做法是让你的用户有Java的6u10中或以后在他们的系统,并为您的应用程序处理任何导致的异常优雅。

All Sun JREs (not just JDKs) from 6u10 onwards come with com.sun.awt.AWTUtilities, so the simplest course of action would be to get your users to have Java 6u10 or later on their systems, and for your application to handle any resulting exception gracefully.

这篇关于如何分发AWTUtilities的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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