WebRenderer has long supported deployment via Java™ Web Start. With the upcoming GA release of our WebRenderer Swing Edition 6.0 (which supports 64bit systems) we have had some requests for documentation on how to deploy WebRenderer via Web Start on both 32 and 64bit systems. This blog hopefully offers a helping hand to those that wish to deploy across multiple operating systems with differing 32/64bit architectures.
The focus here is on deployment attributes for 32 and 64bit systems. It does not cover the end-to-end Web Start deployment process, such as signing JARs and security. Please view our complete Java Web Start documentation for this information.
Java Web Start provides for an efficient deployment mechanism for Java applications. Web Start is particularly suited to deploying applications that have multiple platform optimized libraries. WebRenderer is one of these such libraries. WebRenderer Swing Edition 6.0 is deployed targeting a single platform with 3 JAR files. The 3 core JARs are the webrenderer-swing.jar, webrenderer-swing-xxx.jar and the corecomponents-swing-xxx.jar. Note the “xxx” denotes the platform and the processor architecture. What makes Web Start powerful is that one can target the necessary libraries to the individual platform. This means that instead of deploying all the WebRenderer platform libraries (some of which would not be needed) one can target the resources to the platform, saving bandwidth and making the deployment process seamless.
The Java Web Start Resource tag
The “Resource” tag in the Java Web Start descriptor has two key elements to allow efficient Java application deployment. One important attribute of the resource tag is the “os” attribute. This attribute allows you to specify specific platforms for the deployment of your application. Options in the “os” attribute can be “Windows”, “Linux”, “Mac OS X” etc.
The next relevant resource attribute is the “arch” attribute. This attribute allows for the specification of the processor architecture. Relevant values for the “arch” attribute include “x86” and “amd64” (even for Intel 64bit). Additional “arch” values are seen below in the Web Start JNLP example code.
The following is an example of a Web Start JNLP file (“TestBrowserAllPlatforms.jnlp”):
<jnlp
spec="1.0+"
codebase="{Set the base URL here where all jars stored. For example http://www.webrenderer.com/webstart/}"
href="TestBrowserAllPlatforms.jnlp">
<security>
<all-permissions/>
</security>
<resources>
<j2se version="1.4+"/>
<jar href="TestBrowser.jar"/>
<jar href="webrenderer-swing.jar"/>
</resources>
<resources os="Windows" arch="amd64">
<jar href="webrenderer-swing-windows64.jar"/>
<jar href="corecomponents-swing-windows64.jar"/>
</resources>
<resources os="Windows" arch="x86">
<jar href="webrenderer-swing-windows32.jar"/>
<jar href="corecomponents-swing-windows32.jar"/>
</resources>
<resources os="Linux" arch="amd64">
<jar href="webrenderer-swing-linux64.jar"/>
<jar href="corecomponents-swing-linux64.jar"/>
</resources>
<resources os="Linux" arch="i386 x86">
<jar href="webrenderer-swing-linux32.jar"/>
<jar href="corecomponents-swing-linux32.jar"/>
</resources>
<resources os="Mac\ OS\ X" arch="x86_64">
<jar href="webrenderer-swing-osx64.jar"/>
<jar href="corecomponents-swing-osx64.jar"/>
</resources>
<resources os="Mac\ OS\ X" arch="i386 x86">
<jar href="webrenderer-swing-osx32.jar"/>
<jar href="corecomponents-swing-osx32.jar"/>
</resources>
<application-desc main-class="TestBrowser"/>
</jnlp>
Our complete documentation for Web Start deployment which covers start-to-finish preparation and deployment can be found here..
|