Welcome!

Machine Learning Authors: Pat Romanski, Yeshim Deniz, Liz McMillan, Elizabeth White, Corey Roth

Related Topics: Java IoT, Microservices Expo, Machine Learning , Agile Computing

Java IoT: Blog Post

Applet Deployment Techniques for Platform Deterministic Libraries

It is possible to launch an Applet in a way that will only download the relevant files for the target system

The following code is an example JNLP file that can be utilized to deploy an Applet with platform targeted libraries.

  1. <!--?xml version="1.0" encoding="UTF-8"?-->
  2. <jnlp spec="1.0+" codebase="" href="webrenderer-applet.jnlp">
  3. <security>
  4. <all-permissions>
  5. </all-permissions></security>
  6. <!-- Resources for all platforms -->
  7. <resources>
  8. <j2se version="1.6+">
  9. <jar href="TestBrowser.jar">
  10. <jar href="webrenderer-swing.jar">
  11. </jar></jar></j2se></resources>
  12. <!-- Platform specific resources -->
  13. <resources os="Windows" arch="amd64">
  14. <jar href="webrenderer-swing-windows64.jar">
  15. <jar href="corecomponents-swing-windows64.jar">
  16. </jar></jar></resources>
  17. <resources os="Windows" arch="x86">
  18. <jar href="webrenderer-swing-windows32.jar">
  19. <jar href="corecomponents-swing-windows32.jar">
  20. </jar></jar></resources>
  21. <resources os="Linux" arch="amd64">
  22. <jar href="webrenderer-swing-linux64.jar">
  23. <jar href="corecomponents-swing-linux64.jar">
  24. </jar></jar></resources>
  25. <resources os="Linux" arch="i386 x86">
  26. <jar href="webrenderer-swing-linux32.jar">
  27. <jar href="corecomponents-swing-linux32.jar">
  28. </jar></jar></resources>
  29. <resources os="Mac\ OS\ X" arch="x86_64">
  30. <jar href="webrenderer-swing-osx64.jar">
  31. <jar href="corecomponents-swing-osx64.jar">
  32. </jar></jar></resources>
  33. <resources os="Mac\ OS\ X" arch="i386 x86">
  34. <jar href="webrenderer-swing-osx32.jar">
  35. <jar href="corecomponents-swing-osx32.jar">
  36. </jar></jar></resources>
  37. <resources os="Sun" arch="sparc">
  38. <jar href="webrenderer-swing-solaris32.jar">
  39. <jar href="corecomponents-swing-solaris32.jar">
  40. </jar></jar></resources>
  41. <applet-desc name="TestBrowser Applet" main-class="TestBrowserApplet.class" width="900" height="700">
  42. </applet-desc>
  43. </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:

  1. <code>
  2. <param name="jnlp_href" value="webrenderer-applet.jnlp">
  3. </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:

  1. 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.

More Stories By Duncan Thomas

Duncan Thomas, VP of sales at JadeLiquid Software, is a tech guy caught up in the business of tech!

CloudEXPO Stories
Business professionals no longer wonder if they'll migrate to the cloud; it's now a matter of when. The cloud environment has proved to be a major force in transitioning to an agile business model that enables quick decisions and fast implementation that solidify customer relationships. And when the cloud is combined with the power of cognitive computing, it drives innovation and transformation that achieves astounding competitive advantage.
SYS-CON Events announced today that Silicon India has been named “Media Sponsor” of SYS-CON's 21st International Cloud Expo, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Published in Silicon Valley, Silicon India magazine is the premiere platform for CIOs to discuss their innovative enterprise solutions and allows IT vendors to learn about new solutions that can help grow their business.
DXWorldEXPO LLC announced today that "IoT Now" was named media sponsor of CloudEXPO | DXWorldEXPO 2018 New York, which will take place on November 11-13, 2018 in New York City, NY. IoT Now explores the evolving opportunities and challenges facing CSPs, and it passes on some lessons learned from those who have taken the first steps in next-gen IoT services.
In this presentation, you will learn first hand what works and what doesn't while architecting and deploying OpenStack. Some of the topics will include:- best practices for creating repeatable deployments of OpenStack- multi-site considerations- how to customize OpenStack to integrate with your existing systems and security best practices.
SYS-CON Events announced today that CrowdReviews.com has been named “Media Sponsor” of SYS-CON's 22nd International Cloud Expo, which will take place on June 5–7, 2018, at the Javits Center in New York City, NY. CrowdReviews.com is a transparent online platform for determining which products and services are the best based on the opinion of the crowd. The crowd consists of Internet users that have experienced products and services first-hand and have an interest in letting other potential buyers learn their thoughts on their experience.