Installing the Command-Line Interface
The installation for IBM WebSphere sMash is very easy. At a high level, you simply need to download the zip file and unzip it, set up a proxy server if needed, and test the installation. IBM WebSphere sMash is highly modular. It uses the ivy dependency manager (see http://ant.apache.org/ivy/) to manage dependencies for each application. Every application has tremendous flexibility to include only the modules the application needs. Developers also have the ability to create reusable modules for other applications to use.
For the purposes of this book, it is fine to download the latest stable WebSphere sMash Development Edition driver or the experimental Project Zero driver. You can download either from the Project Zero website (see Figure 1.1).
Figure 1.1 Project Zero website
The website, projectzero.org, will change over time, but you can find the download link to retrieve the zip file from the site. Remember, it is http://projectzero.org.
After you have the zip file on your computer, you need to unzip it using whatever extraction tool you have available. Unzip the contents into a directory of your choosing. The zip file has a base of zero, which you want to retain. In these samples, I am using a top-level directory called development located under my home directory. In the following, replace the location shown with your preferred directory:
unzip ~/Downloads/zero_<version>.zip -d ~/development/
Of course, if you're using a different operating system, your unzip command and paths will look different. After the files are extracted, you should end up with a directory structure similar to that shown in Figure 1.2 under your target directory.
Figure 1.2 Zero directory structure
The final step to finish the installation procedure consists of setting up your environment to include the location to the JRE and the Project Zero binaries. This will be accomplished by manipulating the PATH environment variable appropriately. Placing these commands in your normal login environment ensures that everything is ready to go the next time you log in. This is an optional step, but will save you the hassle of having to specify full paths when running the Zero command line. Examples of these paths for Linux are shown in Listing 1.4.
Listing 1.4. Example Linux Paths
export JAVA_HOME=/usr/lib/jvm/java-1.5.0-ibm-18.104.22.168/jre export ZERO_HOME=~/development/zero export PATH=$JAVA_HOME/bin:$ZERO_HOME:$PATH
For Windows users, you can set the environment variables by accessing the Control Panel > System > Advanced tab > Environmental Variables. Then, in either the user or system areas, add/edit the following values, as shown in Listing 1.5. Be sure to adjust the directory paths to match your actual environment.
Listing 1.5. Example Windows Paths
JAVA_HOME C:\Program Files\Java\jdk1.6.0_16\jre ZERO_HOME C:\development\zero PATH %JAVA_HOME%\bin;%ZERO_HOME%\bin;%PATH%
This completes the basic installation of IBM WebSphere sMash. The next section discusses setting up proxy support. However, if your connection to external websites doesn't require you to use a proxy, skip the proxy section and continue to the section on testing your installation.