#!/bin/sh
# *************************************************************************
# This script is used to set up your environment for compiling and running 
# the code examples included with WebLogic Server. 
# *************************************************************************

WL_HOME="/usr/local/bea/weblogic81"
# Set Production Mode.  When this is set to true, the server starts up in
# production mode.  When set to false, the server starts up in development
# mode.  If it is not set, it will default to false.
PRODUCTION_MODE=""

# Set JAVA_VENDOR to java virtual machine you want to run on server side.
JAVA_VENDOR="BEA"

# Set JAVA_HOME to java virtual machine you want to run on server side.
JAVA_HOME="/usr/local/bea/jrockit81sp3_142_04"

. "${WL_HOME}/common/bin/commEnv.sh"

SAMPLES_HOME="/usr/local/bea/weblogic81/samples"
EXAMPLES_CONFIG="${SAMPLES_HOME}/domains/examples"
EXAMPLES_HOME="${SAMPLES_HOME}/server/examples"
EXAMPLES_BUILD="${EXAMPLES_HOME}/build"

APPLICATIONS="${EXAMPLES_CONFIG}/applications"
CLIENT_CLASSES="${EXAMPLES_BUILD}/clientclasses"
SERVER_CLASSES="${EXAMPLES_BUILD}/serverclasses"
COMMON_CLASSES="${EXAMPLES_BUILD}/common"
EX_WEBAPP_CLASSES="${EXAMPLES_BUILD}/examplesWebApp/WEB-INF/classes"

CLASSPATH="${WL_HOME}/server/lib/webservices.jar${CLASSPATHSEP}${WL_HOME}/server/lib/ejbgen.jar${CLASSPATHSEP}${CLIENT_CLASSES}${CLASSPATHSEP}${SERVER_CLASSES}${CLASSPATHSEP}${POINTBASE_CLASSPATH}${CLASSPATHSEP}${POINTBASE_TOOLS}${CLASSPATHSEP}${COMMON_CLASSES}${CLASSPATHSEP}${CLIENT_CLASSES}/utils_common.jar${CLASSPATHSEP}${WEBLOGIC_CLASSPATH}"
   



# Set up PATH
if [ `uname -s` = "CYGWIN32/NT" ]; then
  # If we are on an old version of Cygnus we need to turn <letter>:/ in the path
  # to //<letter>/
  POINTBASE_HOME_CYGWIN=`echo $POINTBASE_HOME | sed 's#\([a-zA-Z]\):#//\1#g'`
  PATH="${PATH}${PATHSEP}${POINTBASE_HOME_CYGWIN}/tools"
else
  if [ -n "`uname -s |grep -i cygwin_`" ]; then
    # If we are on an new version of Cygnus we need to turn <letter>:/ in 
    # the path to /cygdrive/<letter>/
    CYGDRIVE=`mount -ps | tail -1 | awk '{print $1}' | sed -e 's%/$%%'`
    POINTBASE_HOME_CYGWIN=`echo $POINTBASE_HOME | sed "s#\([a-zA-Z]\):#${CYGDRIVE}/\1#g"`
    PATH="${PATH}${PATHSEP}${POINTBASE_HOME_CYGWIN}/tools"
  else
    # set PATH for other shell environments
    PATH="${PATH}${PATHSEP}${POINTBASE_HOME}/tools"
  fi
fi

export SAMPLES_HOME APPLICATIONS CLIENT_CLASSES SERVER_CLASSES EX_WEBAPP_CLASSES CLASSPATH PATH EXAMPLES_CONFIG EXAMPLES_HOME EXAMPLES_BUILD COMMON_CLASSES