@rem  +-STEP 0----------------------------------------------------------
@rem  | Edit JDK_LIB and WAS_LIB as needed to point to the directories
@rem  | on your system that contain the Java classes.zip file and all
@rem  | the WebSphere Application Server Version 3.0 zip and jar files.

set JDK_LIB=C:\jdk1.1.7b\lib
set WAS_LIB=C:\WebSphere\AppServer\lib


@echo +-STEP 1----------------------------------------------------
@rem  | These are all Account EJB related files to be compiled.  Because 
@rem  | of the "-d ." option, the resulting class files will be placed 
@rem  | in a directory, relative to the current directory, based on the 
@rem  | package statements in the source.
@rem  | The directory will be: ./com/ibm/ejs/doc/account/
@rem  | Note that each compile is done with its own classpath, explicitly 
@rem  | indicating the needed zip/jar files.  Also note that each classpath
@rem  | begins with . (dot) or the current directory.  Therefore, compiles
@rem  | later in the list can find classes in the com.ibm.esj.doc.account
@rem  | package that were comiled earlier in the list, by looking into the
@rem  | directory /com/ibm/ejs/doc/account under the current directory. 

javac -classpath .;%JDK_LIB%\classes.zip;%WAS_LIB%\ejs.jar;%WAS_LIB%\ujc.jar;%WAS_LIB%\iioptools.jar -d . InsufficientFundsException.java
javac -classpath .;%JDK_LIB%\classes.zip;%WAS_LIB%\ejs.jar;%WAS_LIB%\ujc.jar;%WAS_LIB%\iioptools.jar -d . AccountResourceBundle.java
javac -classpath .;%JDK_LIB%\classes.zip;%WAS_LIB%\ejs.jar;%WAS_LIB%\ujc.jar;%WAS_LIB%\iioptools.jar -d . Account.java
javac -classpath .;%JDK_LIB%\classes.zip;%WAS_LIB%\ejs.jar;%WAS_LIB%\ujc.jar;%WAS_LIB%\iioptools.jar -d . AccountKey.java
javac -classpath .;%JDK_LIB%\classes.zip;%WAS_LIB%\ejs.jar;%WAS_LIB%\ujc.jar;%WAS_LIB%\iioptools.jar -d . AccountBean.java
javac -classpath .;%JDK_LIB%\classes.zip;%WAS_LIB%\ejs.jar;%WAS_LIB%\ujc.jar;%WAS_LIB%\iioptools.jar -d . AccountBeanFinderHelper.java
javac -classpath .;%JDK_LIB%\classes.zip;%WAS_LIB%\ejs.jar;%WAS_LIB%\ujc.jar;%WAS_LIB%\iioptools.jar -d . AccountHome.java


@echo +-STEP 2----------------------------------------------------
@rem  | Next, create a JAR file of the above classes for input to the JETACE tool.
@rem  | The JAR file is just an intermediate file and does not have to be kept.

jar cfv AccountJetaceIn.jar com/ibm/ejs/doc/account/*.class


@echo +-STEP 3----------------------------------------------------
@rem  | This is line-mode use of the JETACE tool.  The "-classpath" option
@rem  | locates needed zip/jar files.  The Account.xml file is the   
@rem  | result of running GUI-mode JETACE, specifying various deployment
@rem  | descriptors.  Account.xml points to the AccountJetaceIn.jar file
@rem  | created in the previous step.  Account.xml also points to the
@rem  | Account.jar file to use as output, which is basically
@rem  | what is in the input jar file, plus a deployment descriptor (SER)
@rem  | file.  Account.jar is the EJB JAR file to use to deploy in the
@rem  | WebSphere Administrative Console.

java -classpath .;%JDK_LIB%\classes.zip;%WAS_LIB%\ivbjfaceall.jar;%WAS_LIB%\BEXruntime.jar;%WAS_LIB%\developBEX.jar;%WAS_LIB%\developEJB.jar;%WAS_LIB%\ejs.jar;%WAS_LIB%\ujc.jar;%WAS_LIB%\xml4j.jar;%WAS_LIB%\swingall.jar;.\temp -Dcom.ibm.beans.BeanWorkingDirectory=.\temp com.ibm.ejb.jetjar.JetAceMain -f Account.xml


@echo +-STEP 4----------------------------------------------------
@rem  | Now compile the remaining Transfer EJB files.  TransferBean.java
@rem  | depends on classes from the Account EJB, hence the presence of 
@rem  | Account.jar in the classpath.  Because of the "-d ." option, 
@rem  | the resulting class files will be placed in a directory, relative 
@rem  | to the current directory, based on the package statements in the source.
@rem  | The directory will be: ./com/ibm/ejs/doc/transfer/
@rem  | Note that each compile is done with its own classpath, explicitly 
@rem  | indicating the needed zip/jar files.  Also note that each classpath
@rem  | begins with . (dot) or the current directory.  Therefore, compiles
@rem  | later in the list can find classes in the com.ibm.esj.doc.transfer
@rem  | package that were comiled earlier in the list, by looking into the
@rem  | directory /com/ibm/ejs/doc/transfer under the current directory.

javac -classpath .;%JDK_LIB%\classes.zip;%WAS_LIB%\ejs.jar;%WAS_LIB%\ujc.jar;%WAS_LIB%\iioptools.jar               -d . Transfer.java
javac -classpath .;%JDK_LIB%\classes.zip;%WAS_LIB%\ejs.jar;%WAS_LIB%\ujc.jar;%WAS_LIB%\iioptools.jar               -d . TransferHome.java
javac -classpath .;%JDK_LIB%\classes.zip;%WAS_LIB%\ejs.jar;%WAS_LIB%\ujc.jar;%WAS_LIB%\iioptools.jar;.\Account.jar -d . TransferBean.java


@echo +-STEP 5----------------------------------------------------
@rem  | Next, create a JAR file of the above classes for input to the JETACE tool.
@rem  | The JAR file is just an intermediate file and does not have to be kept.

jar cfv TransferJetaceIn.jar com/ibm/ejs/doc/transfer/*.class com/ibm/ejs/doc/account/InsufficientFundsException.class


@echo +-STEP 6----------------------------------------------------
@rem  | This is line-mode use of the JETACE tool.  The "-classpath" option
@rem  | locates needed zip/jar files.  The Transfer.xml file is the   
@rem  | result of running GUI-mode JETACE, specifying various deployment
@rem  | descriptors.  Transfer.xml points to the TransferJetaceIn.jar file
@rem  | created in the previous step.  Transfer.xml also points to the
@rem  | Transfer.jar file to use as output, which is basically
@rem  | what is in the input jar file, plus a deployment descriptor (SER)
@rem  | file.  Transfer.jar is the EJB JAR file to use to deploy in the
@rem  | WebSphere Administrative Console.

java -classpath .;%JDK_LIB%\classes.zip;%WAS_LIB%\ivbjfaceall.jar;%WAS_LIB%\BEXruntime.jar;%WAS_LIB%\developBEX.jar;%WAS_LIB%\developEJB.jar;%WAS_LIB%\ejs.jar;%WAS_LIB%\ujc.jar;%WAS_LIB%\xml4j.jar;%WAS_LIB%\swingall.jar;.\temp -Dcom.ibm.beans.BeanWorkingDirectory=.\temp com.ibm.ejb.jetjar.JetAceMain -f Transfer.xml


@echo +-STEP 7----------------------------------------------------
@rem  | The next compile is for internationalization (i18n) of the two 
@rem  | servlets compiled in Step 8.  

javac -classpath .;%JDK_LIB%\classes.zip -d . ClientResourceBundle.java


@echo +-STEP 8----------------------------------------------------
@rem  | Finally, compile the servlets and the client application.  Because 
@rem  | of the "-d ." option, the resulting class files will be placed 
@rem  | in a directory, relative to the current directory, based on the 
@rem  | package statements in the source.  The directory will be: 
@rem  | ./com/ibm/ejs/doc/client/

javac -classpath .;%JDK_LIB%\classes.zip;%WAS_LIB%\ejs.jar;%WAS_LIB%\ujc.jar;%WAS_LIB%\iioptools.jar;%WAS_LIB%\servlet.jar;.\Account.jar   -d . CreateAccount.java
javac -classpath .;%JDK_LIB%\classes.zip;%WAS_LIB%\ejs.jar;%WAS_LIB%\ujc.jar;%WAS_LIB%\iioptools.jar;%WAS_LIB%\servlet.jar;.\Transfer.jar  -d . TransferFunds.java
javac -classpath .;%JDK_LIB%\classes.zip;%WAS_LIB%\ejs.jar;%WAS_LIB%\ujc.jar;%WAS_LIB%\iioptools.jar;.\Transfer.jar                        -d . TransferApplication.java