Sun Java System Application Server 

Common Build Instructions for Sample Applications

The sample applications use the Java BluePrints build system that employs a set of Ant build scripts (XML files) in the samples/bp-project directory.

Procedure

In the instructions below, <javaee.home> refers to the path where you installed the Java EE 5 SDK (for Windows, the default path is c:/Sun/AppServer). Follow these steps to build a sample application:

  1. Add <javaee.home>/lib/ant/bin directory to your PATH environment variable. 
  2. Edit the file <javaee.home>/samples/bp-project/build.properties and set the value of javaee.server.passwordfile (see below). Note: the Java EE 5 SDK installer automatically sets default values for some of these properties. 

  3. Property Name Description Examples
    javaee.home The installation directory of the Java EE 5 SDK c:/Sun/AppServer
    javaee.server.name Host name of the server where the Java EE 5 SDK is installed localhost
    javaee.server.port The port number for the server you chose while installing Java EE 5 SDK 8080
    javaee.server.username The administrator username specified for the serve while installing Java EE 5 SDK admin
    javaee.server.passwordfile The path to a file containing the admin password for the Java EE 5 SDK. The password file needs to be in the following format:

    AS_ADMIN_PASSWORD=<javaeesdk-admin-password>

    Where you will replace <javaeesdk-admin-password> with the admin password for the Java EE 5 SDK.

    /path/to/passwordfile
    javaee.adminserver.port The port number for admin server you chose while installing the Java EE 5 SDK 4848
    proxy.host
    The host name of your HTTP proxy server, if the server running Java EE SDK is behind a firewall. Leave blank otherwise myproxy.mydomain
    proxy.port
    The port number of your HTTP proxy server, if the server running Java EE SDK is behind a firewall. Leave blank otherwise
    9090

    If you are not running the samples under Mac OS X or Windows, you will need to define the property 'default.browser' in the build.properties file.
  4. Start the application server and the JavaDB database. To do so, open a command prompt and change directory to <javaee.home>/bin and issue the following commands:
    asadmin start-domain
    asadmin start-database
  5. Follow the process specific to a sample application to build and run it.
  6. Common build targets are
  7. See Using Java DB with Sample applications for information on configuring the built-in Java DB database and corresponding JDBC resources.
  8. See Monitoring Web Services for information on how to monitor web services applications.
  9. All the samples are NetBeans ready and can be opened as netbeans projects in NetBeans IDE.

Copyright © 2006 Sun Microsystems, Inc. All rights reserved.