| By Duncan Thomas | Article Rating: |
|
| November 15, 2012 10:00 AM EST | Reads: |
1,869 |
The following code is an example JNLP file that can be utilized to deploy an Applet with platform targeted libraries.
- <!--?xml version="1.0" encoding="UTF-8"?-->
- <jnlp spec="1.0+" codebase="" href="webrenderer-applet.jnlp">
- <security>
- <all-permissions>
- </all-permissions></security>
- <!-- Resources for all platforms -->
- <resources>
- <j2se version="1.6+">
- <jar href="TestBrowser.jar">
- <jar href="webrenderer-swing.jar">
- </jar></jar></j2se></resources>
- <!-- Platform specific resources -->
- <resources os="Windows" arch="amd64">
- <jar href="webrenderer-swing-windows64.jar">
- <jar href="corecomponents-swing-windows64.jar">
- </jar></jar></resources>
- <resources os="Windows" arch="x86">
- <jar href="webrenderer-swing-windows32.jar">
- <jar href="corecomponents-swing-windows32.jar">
- </jar></jar></resources>
- <resources os="Linux" arch="amd64">
- <jar href="webrenderer-swing-linux64.jar">
- <jar href="corecomponents-swing-linux64.jar">
- </jar></jar></resources>
- <resources os="Linux" arch="i386 x86">
- <jar href="webrenderer-swing-linux32.jar">
- <jar href="corecomponents-swing-linux32.jar">
- </jar></jar></resources>
- <resources os="Mac\ OS\ X" arch="x86_64">
- <jar href="webrenderer-swing-osx64.jar">
- <jar href="corecomponents-swing-osx64.jar">
- </jar></jar></resources>
- <resources os="Mac\ OS\ X" arch="i386 x86">
- <jar href="webrenderer-swing-osx32.jar">
- <jar href="corecomponents-swing-osx32.jar">
- </jar></jar></resources>
- <resources os="Sun" arch="sparc">
- <jar href="webrenderer-swing-solaris32.jar">
- <jar href="corecomponents-swing-solaris32.jar">
- </jar></jar></resources>
- <applet-desc name="TestBrowser Applet" main-class="TestBrowserApplet.class" width="900" height="700">
- </applet-desc>
- </jnlp>
This JNLP file (webrenderer-applet.jnlp) specifies the WebRenderer libraries as resources under different Operating Systems and Architectures. Through this deployment specification only the files needed are downloaded to the target machine. For demonstration purposes WebRenderer is run from a simple program called TestBrowser (included with the WebRenderer download) and is specified at the end of the JNLP file above under “applet-desc”.
Enabling JNLP deployment for Applets requires an extra param tag to be added inside the Applet tag that refers to the JNLP file:
- <code>
- <param name="jnlp_href" value="webrenderer-applet.jnlp">
- </code>
The architecture used on a particular platform by the Applet depends on the Java architecture that the browser is using. So on a 64-bit OS that is using 32-bit Java, the 32-bit WebRenderer libraries will be used.
The values for “arch” property are the same as is returned in Java by the function:
- System.getProperty("os.arch")
As with all Applets, each library will need to be signed. Details on signing your Applets resources can be found here..
And for more information on WebRenderer, please visit us here.
Published November 15, 2012 Reads 1,869
Copyright © 2012 SYS-CON Media, Inc. — All Rights Reserved.
Syndicated stories and blog feeds, all rights reserved by the author.
More Stories By Duncan Thomas
Duncan Thomas, VP of sales at JadeLiquid Software, is a tech guy caught up in the business of tech!
- Cloud People: A Who's Who of Cloud Computing
- New Relic Q1 2013 Blazes Past Growth Targets and Reaches 40,000 Active Customer Accounts
- Cloud Expo New York: Delivering Digital Marketing on the Cloud
- Cloud Expo New York: Rethink IT and Reinvent Business with IBM SmartCloud
- Cloudant to Exhibit at Cloud Expo & Big Data Expo New York
- The Accessibility of the Cloud
- Learn How To Use Google Apps Script
- Cloud Expo NY: Best Practices for Delivering Oracle Database as a Service
- Cloud Expo New York: Basics of SSD Technology and Its Use in Cloud
- Session Topics: 12th Cloud Expo / Cloud Expo New York
- Cloud Expo New York: The Big Challenge of Big Data & Hadoop Integration
- Measuring the Business Value of Cloud Computing
- Cloud People: A Who's Who of Cloud Computing
- Cloud Expo New York: Best CIO Practices Shared from SHI’s Customers
- Cloud Expo New York: How to Use Google Apps Script
- New Relic Q1 2013 Blazes Past Growth Targets and Reaches 40,000 Active Customer Accounts
- Cloud Expo New York: Why Big Data Is Really About Small Data
- Cloud Expo New York: Delivering Digital Marketing on the Cloud
- Small Cancers, Big Data, and a Life Examined
- Cloud Expo New York: Requirements of a Cloud Database
- Cloud Expo New York: Rethink IT and Reinvent Business with IBM SmartCloud
- Cloudant to Exhibit at Cloud Expo & Big Data Expo New York
- The Accessibility of the Cloud
- Learn How To Use Google Apps Script
- A Cup of AJAX? Nay, Just Regular Java Please
- Java Developer's Journal Exclusive: 2006 "JDJ Editors' Choice" Awards
- JavaServer Faces (JSF) vs Struts
- The i-Technology Right Stuff
- Rich Internet Applications with Adobe Flex 2 and Java
- Java vs C++ "Shootout" Revisited
- Bean-Managed Persistence Using a Proxy List
- Reporting Made Easy with JasperReports and Hibernate
- Creating a Pet Store Application with JavaServer Faces, Spring, and Hibernate
- Why Do 'Cool Kids' Choose Ruby or PHP to Build Websites Instead of Java?
- What's New in Eclipse?
- Where Are RIA Technologies Headed in 2008?






















