Getting Source, Build, and Run ToolsUI


In preperation for some hands on IOServiceProvider work, we need a few things setup and ready to go. First, we'll look at how to get the netCDF-Java/CDM code. Second, we'll build it with Ant. And, Finally, we'll run the ToolsUI application.

Getting Source

Distribution

The current stable release code distribution can be found on

Source for Workshop

The required source is available from a tar file at /data/nj/nj22WkshpCode.tar.gz. Unpack this in your home directory:

  1. Make a directory to unpack into
  2. Unpack the code

Build from Source

To build the netCDF-Java library (CDM) and ToolsUI application:

  1. Move into the cdm directory, the location of the Ant script
  2. Clean your working directory
  3. Build CDM and the ToolsUI
Other Ant targets of interest:

Now let's run the netCDF ToolsUI application:

  1. Run script at target/runToolsUI

This script runs the following command (with the classpath expanded):

Excercise: Unpack Source, Build, and Run ToolsUI

We'll take the next 15 minutes so you can get this setup on your machines.

  1. Unpack the source
  2. Build using Ant
  3. Run ToolsUI
Once you've got that working, feel free to try installing a development environment. We will be working in IntelliJ IDEA.

Build Using IntelliJ IDEA

Most of our netCDF-Java and THREDDS team uses IntelliJ IDEA. So, we have IntelliJ project files available. If you know IntelliJ (or just want to try it), we have the latest distribution available at /data/ncj/idea-6.0.5.tar.gz. It's easy and no license is required for a 30 day trail.

  1. Install IntelliJ IDEA in your home directory
  2. Set JDK_HOME environment variable
  3. Change memory settings for IDEA
  4. Run IDEA
  5. Open Project: intelliJ/thredds.ipr
  6. Open project window
  7. Set default VCS to subversion
  8. Set up JDK (/usr/java/jdk1.5.0_12)
  9. Build project
  10. Setup to run ToolsUI
    1. Select menu item: "Run" - "Edit Configurations"
    2. Add new configuration by selecting the "+" icon and "Application"
    3. Set name to "ToolsUI"
    4. Set main class to "ucar.nc2.ui.ToolsUI"
    5. Set VM parameters to "-Xmx256 -ea"
    6. Set working directory to the "ui" rather than "intelliJ" directory
    7. Click on the OK button
  11. Run ToolsUI

Build Using Eclipse

Sorry, you are on your own with Eclipse. Not many Eclipse users at Unidata.

Build Using NetBeans

Sorry, once again you are on your own if you want to use NetBeans.