Rich Internet applications (RIAs) usually need a minimum version of the Java Runtime Environment (JRE) software to be present on the client machine. When deploying a RIA, you need to ensure that client machines have the required version of the JRE software so that your RIA can function well. With the Deployment Toolkit script, you have at least two ways to handle this requirement.
You can check the version of client JRE software as soon as users access your web site and install the latest version if necessary.
You can let users navigate the web site, and check and install the latest JRE only when they attempt to use your RIA.
Checking and Installing the Latest JRE Software When the User Accesses Your Web Site
The following example checks if a user has at least version 1.6.0_13 of the JRE software installed. If not, the code installs the latest JRE software . See inline comments in the code.
<script src="http://www.java.com/js/deployJava.js"></script>
<script>
// check if current JRE version is greater than 1.6.0
alert("versioncheck " + deployJava.versionCheck('1.6.0_10+'));
if (deployJava.versionCheck('1.6.0_10+') == false) {
userInput = confirm("You need the latest Java(TM) Runtime Environment. Would you like to update now?");
if (userInput == true) {
// Set deployJava.returnPage to make sure user comes back to
// your web site after installing the JRE
deployJava.returnPage = location.href;
// install latest JRE or redirect user to another page to get JRE from.
deployJava.installLatestJRE();
}
}
</script>
Installing the Correct JRE Software Only When the User Attempts to Use Your RIA
When you specify the minimum version of the JRE software in the runApplet or createWebStartLaunchButton function, the Deployment Toolkit script makes sure that the required version of the JRE software exists on the client before running your RIA.
Use the runApplet function to deploy an applet, as shown in the following example. The last parameter of the runApplet function is the minimum version that is required to the run your applet (version 1.6).
<script src="http://www.java.com/js/deployJava.js"></script>
<script>
var attributes = { code:'components.DynamicTreeApplet', width:300, height:300};
var parameters = {jnlp_href: 'dynamictree-applet.jnlp'};
deployJava.runApplet(attributes, parameters, '1.6');
</script>
To deploy a Java Web Start application, use the createWebStartLaunchButton function with the correct minimum version parameter (version 1.6).
<script src="http://www.java.com/js/deployJava.js"></script>
<script>
var url = "dynamictree-applet.jnlp";
deployJava.createWebStartLaunchButton(url, '1.6.0');
</script>
The runApplet and createWebStartLaunchButton functions check the client's version of the JRE software. If the minimum version is not installed, the funtions install the latest version of the JRE software.
分享到:
相关推荐
7. **Evolving a Documentation System**: The documentation system evolves alongside the software development process, maintaining living documentation that reflects the current state of the software. ...
provide the requirements for ensuring software safety across all NASA Centers, programs, projects, and facilities. It describes the activities necessary to ensure that safety is designed into the ...
Stroustrup emphasizes the importance of balancing innovation with compatibility, ensuring that the language remains accessible to both new and experienced developers while embracing new trends in ...
Early damage detection on ...the presence of damage. Finally, laboratory experiments are conducted to validate this work and a good agreement between numerical and experimental results is obtained.
Hohmann highlights the importance of considering the broader impact of software decisions on an organization's overall strategy, operations, and competitive position. #### Key Lessons and Insights ...
However, this also calls for new approaches to ensuring the quality and reliability of these services. The objective of this book is, by applying a systematic approach, to assess the state-of-the-art...
7.5 You agree that Vagaa is not responsible or liable for any loss or damage of any sort incurred as the result of any such dealings or as the result of the presence of such advertisers on Vagaa and/ ...
Tools like model-to-code generators can automate much of this process, ensuring that the generated code accurately reflects the model's specifications. #### Ensuring That the Model and the Code Are ...
### Web Analytics 2.0: The Art of Online Accountability and Science of Customer Centricity #### Chapter 1: The Bold New World of Web Analytics 2.0 In this chapter, Avinash Kaushik introduces the ...
with due respect to the original software tools ideology as well as usability, performance and stability.” The architectural guidelines help determine whether a problem that someone wants to be ...
2.Testing: This activity focuses on ensuring the quality of the software by identifying and fixing bugs, errors, and performance issues. Testing is done at different stages, including unit testing, ...
With its comprehensive suite of tools and services, the company is well-positioned to support the evolving needs of the automotive industry, particularly in the areas of ECU software, infotainment, ...
Chapter 6 of the "Software Engineering" course material delves into the critical phase of Requirements Modeling, focusing on Scenarios, Information, and Analysis Classes. Requirements analysis is a ...
The software aspect of the project focuses on the development of the driver software responsible for managing the stepper motor's motion control and the interaction between the microcontroller and ...
The project not only demonstrates technical proficiency but also highlights the importance of considering usability, security, and maintainability in software development. [关键词]: 移动平台、C/S...
These calculations and selections are crucial for optimizing performance and ensuring the longevity of the equipment. The conclusion summarizes the findings, emphasizing the significance of the ...
Technical feasibility checks if the available hardware and software resources can support the development and deployment of the system. Operational feasibility assesses whether the system can be ...
SSL/TLS encryption can be used to secure communication between the client and server, ensuring the confidentiality of sensitive information like credit card details. In conclusion, the Sd球鞋销售...