Installing and configuring: Command-Line Interface

The IBM® WebSphere® sMash command-line interface provides the basic support for developing and executing WebSphere sMash applications.

Prerequisites

The following prerequisites are required to use the command line tools:

  • Windows, Linux, or Mac operating system
  • Java SE Development Kit (JDK) 5.0 or 6.0
    • Note: IBM employees should download the Java SDK from the IBM internal site.

Installation

  1. Download the zero-<version>.zip . Accept the license agreement then click zero-<version>.zip to download.
  2. Unzip zero-<version>.zip into any directory(see note). The root directory after unzipping will be called zero, we will refer to this directory as <zerohome> .
  3. Add <zerohome> to the PATH environment variable.
  4. Add the bin directory under the JDK installation directory to the PATH environment variable.

provides no Double-Byte Character Set (DBCS) support on the installation path.

Getting started

  1. Open a command prompt.
  2. Type the following:
    zero create demo
    To create a new WebSphere sMash application (created in a new subdirectory called demo)
  3. Change directory into demo .
  4. Type zero start to start the application. Log messages are printed showing that the HTTP adapter has started (for example xxxxxx running on port 8080).
  5. From the browser type http://localhost:8080/. A page indicates that the application is running.

Adding PHP support (Optional)

If you want to add PHP support for your application, follow the steps below :

  1. Stop the application.
    zero stop
  2. Add the PHP dependency to the application. Within your application's directory, edit config/ivy.xml . Add the entry <dependency name="zero.php" org="zero" rev="1.0+"/> to the dependencies element.
  3. Find the new dependency and associate it with your application. This step is called resolving the dependency.
    zero resolve
  4. Add PHP scripts to the application's public directory.
  5. Optionally modify the settings in the PHP configuration file config/php.ini .
  6. Start the application.
  7. From the browser type "http://localhost:8080/<name of script>.php" to execute the script.

To run PHP on Windows ensure you have the Microsoft C++ Runtime Libraries installed.

Version 1.1.0.0.19254