Reputation: 4067
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
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 :-(
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.
Upvotes: 1
Views: 619
Reputation: 54605
Just use the $(os-name)$
construct as mentioned in the documentation
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.
Upvotes: 1