简体   繁体   English

Java插件(JAI)自动安装

[英]Java plugin (JAI) automatic installation

I was wondering if anyone has any experience getting JAI to auto install from an applet for multiple platforms. 我想知道是否有人具有从多个平台的applet自动安装JAI的经验。 I've looked at 我看过

http://java.sun.com/j2se/1.4.2/docs/guide/plugin/developer_guide/extensions.html#specifying 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. 似乎暗示着(事实上没有相反的说法)我只能指定一个平台安装程序。 eg 例如

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

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. 无论如何,我都看不到基于平台的实现URL,而JAI有很多本机内容,因此看起来我必须选择一个平台。 I must be missing something obvious as this defeats the initial major objective of Java :-( 我肯定想念一些明显的东西,因为这违反了Java最初的主要目标:-(

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. 我能想到的唯一解决方案是指定一个可以希望确定目标平台是什么的URL,然后发送回相关文件,创建多个applet jar,每个jar具有不同的清单。 This is far from ideal. 这远非理想。

Just use the $(os-name)$ construct as mentioned in the documentation 只需使用文档中提到的$(os-name)$构造

Optional Package Versioning: Download and Installation of Optional Packages 可选软件包版本控制:可选软件包的下载和安装

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

Where $(os-name)$ holds the name of the target operating system as defined by the os.name system property. 其中$(os-name)$包含由os.name系统属性定义的目标操作系统的名称。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM