- Lab 1:
  - For this lab you will turn the macro you wrote for Lab 3 in the Macros - Part 2 (Graphics) module into a webstart application.
    - So that everyone is on the same page just start by copying the Lab 3 solution and saving it as `webstartlab.mm` and `webstartlab.mmp` into the `mcr` area of your `TRAIN` option tree.

          graphicslab3.mm  --> webstartlab.mm
          graphicslab3.mmp --> webstartlab.mmp

    - Do a quick `UPDATE` to add `WEBSTARTLAB` to the dictionary.
  - What you need to do:
    1. Start by copying the sample Web Start JNLP file page $NMROOT/htdocs/shell.jnlp to your $NMROOT/jars directory (you will need to right-click on the link and select "Save Link As..." otherwise it will try to launch Java Web Start). Save the page as `$NMROOT/jars/xxx_webstart.jnlp` substituting your initials for `xxx`.
    2. Copy the sample web page with links to the JNLP file (xxx_webstart.html) to your $NMROOT/jars directory (you will need to right-click on the link and select "Save Link As..."). Save the page as `$NMROOT/jars/xxx_webstart.html` again substituting your initials for `xxx`.
    3. Edit the `<your_initials>_webstart.html` file to change the link (<a href="...">) to match your initials.
    4. Now edit the `<your_initials>_webstart.jnlp` file...
       1. At the top of the file, change the `href="..."` to a relative link to your .jnlp file (i.e. xxx_webstart.jnlp again substituting your initials for xxx) and `codebase="..."` to a local file URL for your $NMROOT directory (i.e file:///home/student/nxmxxx).
          Note: The file URL has three forward slashes after the colon.
       2. Add an entry for the `nxm-train.jar` file. It will look similar to the one for `nxm-sys.jar` but will omit the `main="true"` part.
       3. Under `<resources>`, add a new `<property...>` tag as shown below.
          `<property name="OPTS" value="TRAIN,SYS"/>`
          (This sets the `PATH` correctly to include TRAIN and SYS option trees.)
       4. Change `<argument>...</argument>` so that it runs your macro (`webstartlab`) rather than `shellgui`.
    5. Build the `nxm-train.jar` JAR file. You can do this by running...

           nM> make all train

    6. Point your web browser to your xxx_webstart.html file:
       i.e. file:///home/student/nxmxxx/jars/xxx_webstart.html
    7. You can also run your Java Web Start application without a web browser with the `javaws` command:

           javaws file:///home/student/nxmxxx/jars/xxx_webstart.html