HW0.4: Get Java Web Start Working

This step assumes you've already done HW0.2 and HW0.3.

There are a handful of Java demos, written by other people, that we'll use throughout the class. Most of these were designed to run as applets in web pages, but modern web browsers don't support embedded Java applets (they're a security risk). Instead, there's a standalone program called “Java Web Start” that lets us run the applets as standalone programs.

Hand-in: follow these steps and then take a screenshot that shows both your terminal window and the running demo application.

  1. Go to the webpage for the Brown U Graphics Group's “Bezier Splines” demo. Right-click the “Run with JavaWebStart” link and save the linked file somewhere on your computer.
  2. On the command line, navigate to the directory where you downloaded the demo file. Then enter the following command (note that the > is just the prompt; it's not part of the command):

    > javaws bezier_splines_java_jnlp.jnlp
  3. Hopefully, the next thing that happens should be that you get a bunch of security errors. Java is (rightly) configured to not allow you to run untrusted programs like this. You need to introduce some exceptions.

    • On Mac: click on the apple icon in the upper-left corner of the screen, and pick System Preferences.... You should see “Java” near the bottom row. (If not, skip to the step below in which you update Java.) Click this.
    • On Windows: search for “Configure Java” and open it.

    In either case, a “Java Control Panel” window should pop up. Select the Security tab, and then add these four entries to your “Exception Site List”:

    http://www.graphics.cs.brown.edu
    http://graphics.cs.brown.edu
    http://www.cs.brown.edu
    http://cs.brown.edu
    

    Close out of all the settings dialogs and go back to step 2.

  4. If the program runs and produces at most a couple lines of error output on your command line, then you're done! Take your screenshot and skip the rest of this page.
  5. If you have problems, you probably need to install the Java Software Development Kit (also known as the JDK). Follow these instructions very carefully:
    1. Close your terminal window.
    2. For Windows, you first need to determine whether you're on a 32-bit or 64-bit platform. Click the Start button, then Right-click “Computer” and select Properties. Look under “System” to see which platform you're on.
    3. Go to http://www.oracle.com/technetwork/java/javase/downloads/index.html.
    4. Click the big “Java Platform (JDK)” button, or click the blue “Download” button below and to the right that's labeled “JDK”. This takes you to a long, complicated download page.
    5. The download page has several gray boxes in it, each one with a title. Some are “Java SE Development Kit”, and some are “Java SE Development Kit Demos and Samples”. Scroll down to the grey box for the newest version of “Java SE Development Kit”.
    6. Click the “Accept License Agreement” radio button.
    7. Then click on the download link (rightmost column) corresponding to your platform. This will download a large installer file.
    8. Once downloaded, run the installer.
    9. Once installed, delete the installer file.
  6. Now open a new terminal window and try step 2 again.

⟵ Back to the main assignment