Building the runtime environment for the customized message generator

To use a jar file including the customized message generator, go to the customclasses directory and use the jar command to build a jar format from the com directory. Otherwise, you can use the directory path to set up your environment.

NoteSybase recommends that you use jar file format for the customization.

StepsBuilding a jar file

  1. Change to the customclasses directory.

    • On Windows:

      cd C:\work\custom\customclasses
      
    • On UNIX:

      cd /work/custom/customclasses
      
  2. Build the jar file:

    • On Windows:

      C:\jdk141\bin\jar -cf mycustom.jar com
      
    • On UNIX:

      /usr/jdk141/bin/jar -cf mycustom.jar com
      
  3. Add the path to mycustom.jar to your environment.

    • For EAServer:

      1. Copy the jar file or the directory structure containing the Java classes created from the previous step to the java\classes (Windows) or java/classes (UNIX) directory for EAServer.

      2. Run EAServer and connect to it from Jaguar Manager.

      3. If you are using the jar file, go to the Servers/<your server> directory and select the Server Properties menu. From the pop-up, select the Java Classes tab and click Add to add the name of the jarfile, such as mycustom.jar.

      4. Click OK.

      5. Shut down and restart EAServer to activate the environment changes.

    • For WebLogic:

      1. Shut down the application server if it is running.

      2. Modify %BEA_HOME%\repra\bin\repra_env.bat (Windows) or $BEA_HOME/repra/bin/repra_env.sh (UNIX) to add the full path of mycustom.jar or the customclasses directory to the end of the CLASSPATH definition.

        • On Windows, enter one of these:

          • set CLASSPATH=C:\work\custom\customclasses;%CLASSPATH%
            

            OR

          • set CLASSPATH=C:\work\custom\customclasses\mycustom.jar;%CLASSPATH%
            
        • On UNIX, enter one of these:

          • CLASSPATH=/work/custom/customclasses:$CLASSPATH
            

            OR

          • CLASSPATH=/work/custom/customclasses/mycustom.jar;$CLASSPATH
            
      3. Start the WebLogic Server to activate the environment changes.