Where to Start with Java Web Start, Page 3
Launching an Application Using Java Web StartAs discussed previously, you need a web page to launch an application with Java Web Start. As an example, take the following code snippet for a HTML file named MyApp.html, which contains a link to launch the application pointing to MyApp.jnlp:
<html> <head> <title>JNLP usage demo!</title> </head> <body> <a href="MyApp.jnlp">Launch My Application</a> </body> </html>
When you invoke the file MyApp.html from a browser with a URL that points to the file (maybe something like http://localhost:8080/MyApp.html), a web page will display the link for "Launch My Application." On clicking this link (as long as the .jnlp MIME type is configured), Java Web Start launches the application MyApp with the parameters provided in the demo JNLP file.
When Java Web Start Is Not Available on User's SystemDuring development, you usually have Java Web Start installed on most of your systems, but this may not always be the case during deployment. Many times, end-user systems will not have Java Web Start installed and hence the clients will not behave as you expect. The user will just assume that your application does not work.
This article has given you enough information to get started with Java Web Start. When you have mastered the basics, you can accomplish much more with the technology by customizing the .jnlp file and exploring more of its concepts.
For Further Reading
About the AuthorSridhar M S is a Java developer from Bangalore, India. He holds a master's degree in Computer Science.