Java插件(JAI)自动安装 [英] Java plugin (JAI) automatic installation

查看:36
本文介绍了Java插件(JAI)自动安装的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道是否有人有让 JAI 从多个平台的小程序自动安装的经验.我看过

I was wondering if anyone has any experience getting JAI to auto install from an applet for multiple platforms. I've looked at

http://java.sun.com/j2se/1.4.2/docs/guide/plugin/developer_guide/extensions.html#specifying

而且这似乎暗示(事实上没有提到相反的情况)我只能指定一个平台安装程序.例如

And it seems to imply (by the fact nothing to the contrary is mentioned) I can only specify an single platforms installer. e.g.

Extension-List: jai_core
jai_core-Extension-Name: javax.media.jai
jai_core-Specification-Version: 1.1-mr
jai_core-Implementation-Version: 1.1.3
jai_core-Implementation-Vendor-Id: com.sun
jai_core-Implementation-URL: http://mydomain.com/jai-windows.jar

无论如何我都看不到指定基于平台的实现 url 并且 JAI 有很多本机内容,所以看起来我必须选择一个平台.我一定遗漏了一些明显的东西,因为这违背了 Java 最初的主要目标:-(

I can't see anyway of specifying an implementation url based on platform and JAI has a lot of native stuff so it looks like I have to choose a single platform. I must be missing something obvious as this defeats the initial major objective of Java :-(

我能想到的唯一解决方案是指定一个 url 来确定目标平台是什么,然后发回相关文件,创建多个小程序 jar,每个都有不同的清单.这远非理想.

The only solutions I can think is to either specify an url to something that can hopefully determine what the target platform is and send back the relevant file, create multiple applet jars, each with different manifests. This is far from ideal.

推荐答案

只需使用文档中提到的 $(os-name)$ 结构

Just use the $(os-name)$ construct as mentioned in the documentation

可选包版本控制:下载和安装可选包

jai_core-Implementation-URL: http://mydomain.com/jai-$(os-name)$.jar

其中 $(os-name)$ 保存由 os.name 系统属性定义的目标操作系统的名称.

Where $(os-name)$ holds the name of the target operating system as defined by the os.name system property.

这篇关于Java插件(JAI)自动安装的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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