The movement toward cloud-based compute has bring many program that were usually run from your hard drive onto the Internet. You can program your Java program (JDK 6 or above) to robotically send users to these programs when appropriate with a few simple lines of code.

Instructions

Step1

Import "java.awt.Desktop" and "java.net.URI" at the start of your code, outside of your class assertion and without the citation marks.

Step2

Define the Internet program that you want to begin in a string called "url." For illustration, the following String assertion, minus the outer passage marks, launches Google Docs when used: "String url = "http://www.google.com/docs";."

Step3

Call "Desktop.getDesktop().peruse(java.net.URI.create(u rl));" to launch the computer's default Web browser, which then continually opens the URL of the Internet program definite in step 2.