#!/bin/sh #++ # runclass: Run the main method of class in the specified webapp # $1 - webapp # $2 - class # $3,... - arguments # # # MODIFIED # ssherrif 12/11/07 - Using the variable EM_JDBC_NAME instead of hard coded jar file name. # ssherrif 12/11/07 - Adding ojdbc5 instead of ojdbc14.jar. # ssherrif 12/02/07 - Adjust OMS_ROOT for SHIPHOME env. # mswamyt 09/12/06 - adding servlet.jar and http_client.jar # hupot 06/13/06 - passing test properties file as sys prop # smodh 01/25/06 - Use ojdbc14.jar # jriel 09/12/05 - platform specific separator # jriel 01/13/05 - allow quoted params # gallison 11/19/04 - add emdb # afontana 09/17/04 - add emcore to classpath # skini 04/09/03 - Add webapp's classes directory to classpath # vsekuboy 06/26/02 - Replaced /usr/bin/sh to /bin/sh and corrected the definition of JAVA_HOME # sgrover 02/13/02 - add SRCHOME check for OH. # sgrover 01/21/02 - use classes12 first. # sgrover 12/20/01 - add jdbc. # sgrover 12/19/01 - add new jar dirs. # rpinnama 12/10/01 - Pick classes from j2ee/home. # # if [ "$1" = "-verbose" ] then VERBOSE=true shift fi WEBAPP=$1 shift CLASSTORUN=$1 shift if [ "$WEBAPP" = "" -o "CLASSTORUN" = "" ] then echo "Usage: runclass " exit 1 fi if [ "$PSEP" = "" ] then PSEP=":" fi if [ "$EMDROOT" = "" ] then if [ "$SRCHOME" = "" ] then echo "Please set your EMDROOT variable before you run runclass" exit 1 else EMDROOT=$SRCHOME/emdw export EMDROOT fi fi if [ "$ORACLE_HOME" = "" ] then ORACLE_HOME=$EMDROOT fi CP="" for i in `ls $EMDROOT/sysman/webapps/$WEBAPP/WEB-INF/lib/*.jar` do CP=$i$PSEP$CP done for i in `ls $ORACLE_HOME/emdb/lib/*.jar` do CP=$i$PSEP$CP done for i in `ls $ORACLE_HOME/emcore/lib/*.jar` do CP=$i$PSEP$CP done for i in `ls $ORACLE_HOME/lib/*.jar` do CP=$i$PSEP$CP done for i in `ls $ORACLE_HOME/jlib/*.jar` do CP=$i$PSEP$CP done for i in `ls $ORACLE_HOME/jdbc/lib/*.jar` do CP=$i$PSEP$CP done if [ "$SHIPHOME" = "1" ] then JDBCJAR=$OMS_ROOT/jdbc/lib/$EM_JDBC_NAME else JDBCJAR=$ORACLE_HOME/jdbc/lib/$EM_JDBC_NAME fi CP=$ORACLE_HOME/j2ee/home/lib/servlet.jar$PSEP$ORACLE_HOME/j2ee/home/lib/http_client.jar$PSEP$JDBCJAR$PSEP$EMDROOT/sysman/webapps/$WEBAPP/WEB-INF/classes$PSEP$CP if [ "$JAVA_HOME" = "" ] then JAVA_HOME=$ORACLE_HOME/jdk fi if [ "$VERBOSE" = "true" ] then echo $JAVA_HOME/bin/java -cp $CP $CLASSTORUN $* fi $JAVA_HOME/bin/java -DEMDW_ROOT=$EMDROOT -DEMDROOT=$EMDROOT -DORACLE_HOME=$ORACLE_HOME -DTEST_PROP_FILE=$T_WORK/test.properties.log -cp $CP $CLASSTORUN "$@"