Tuesday, January 15, 2013

SET ENVIRONMENT COMMAND LINE WINDOW


Procedure for Building and Deploying the Application
The build files are present in the tutorial folders, so the steps you need to follow to build
and deploy the application are quite simple.
Note:
These instructions assume particular folder locations for Ant, Nexaweb
Platform, and the Java Developers Kit. On your PC, the locations may be
different.

  1. Open a command window.
  2. Make sure that the bin folder of the Ant installation is in your PATH.
    set PATH=%PATH%;C:\apache-ant-1.6.2\bin
  3. Make sure the .jar file containing the nexawebify Ant task is in your CLASSPATH.
    set CLASSPATH=%CLASSPATH%;C:\Program Files\Nexaweb\Nexaweb
    Platform 4.0\bin\nexaweb-platform-installer.jar
  4. Make sure the location of your Java Development Kit is specified in JAVA_HOME.
    set JAVA_HOME=C:\jdk1.3.1_09
  5. Navigate to the folder:
    cd C:\Program Files\Nexaweb\Nexaweb Platform 4.0\samples\tutorial1
  6. Run Ant specifying the target: dist.
    ant dist
    Ant will read through and process the instructions in build.xml and display progress
    messages for each step. In the final step, Ant will build the WAR file. If everything is
    OK, the final message is “BUILD SUCCESSFUL”.
  7. Copy the WAR file from tutorial1/dist to your servlet container.
  8. Follow the procedure for your servlet container to deploy a WAR file.

Note:
You can get a list of build targets and the default target by running:
ant -projecthelp