Compiling the PeopleSoft API Java Programs

How to:

PeopleSoft places the Java programs to compile in the directory called

psoft8_components\PeopleSoft\Generated\CompIntfc

where:

psoft8_components

Is the directory specified during the build process.

If you chose to generate all APIs, the systems creates a second directory, that you are not required to access, called

psoft8_components\PeopleSoft\Generated\PeopleSoft

The process for compiling the PeopleSoft API Java Programs depends on whether you are compiling on the machine where you installed iWay Explorer or on another machine.

Note: There are two Java programs for every API file that you selected when you built the Java programs. For more information, see Building the PeopleSoft API Java Programs.

Before you compile the Java programs, you require the PeopleSoft Java Object Adapter, the psjoa.jar file, that resides on your PeopleSoft Application Server under the PS_HOME\Web\psjoa directory. This is the file that you placed in the adapter lib directory during installation. For more information, see the iWay Installation and Configuration manual.


Top of page

x
Procedure: How to Compile the PeopleSoft API Java Programs on Another Machine

Note: If you are running on UNIX, do the compile and JAR steps on Windows NT and then move the file to your UNIX machine. The JAR file is binary. If you use an FTP-based tool to move your JAR file from Windows NT to UNIX, the file format must be set to binary.

To compile the PeopleSoft API Java programs on a machine other than the one where you installed iWay Explorer:

  1. Obtain a copy of the psjoa.jar file from the PeopleSoft Application Server.
  2. Ensure that the psjoa.jar file is in the Java class path before you compile the programs.
  3. Compile the Java programs and ensure that you include the following path:
    \PeopleSoft\Generated\CompIntfc

    Note: The path is case-sensitive.

    The following Windows NT BAT file, run from the psoft8_components directory, properly compiles the Java APIs. (The code assumes that psjoa.jar was placed in psoft8_components.)

    @echo off
    set JAVA_HOME=<my-java-home> 
    set PATH=%JAVA_HOME%\bin;%PATH%
    set CLASSPATH=%JAVA_HOME%\lib\tools.jar;psjoa.jar;%CLASSPATH%
    javac -classpath %CLASSPATH% .\PeopleSoft\Generated\CompIntfc\*.java

    where:

    <my-java-home>

    Is the fully qualified path name of your Java home directory.

    This code places the class files in the same directory with the Java files, but you can choose a different location depending on your site requirements.

  4. Compress the class files into a JAR file.

    The following Windows BAT file, if run from the psoft8_components directory, creates a correct JAR file:

    @echo off
    set JAVA_HOME= my-java-home 
    set PATH=%JAVA_HOME%\bin;%PATH%
    set CLASSPATH=%JAVA_HOME%\lib\tools.jar;%CLASSPATH%
    jar cvf my-jar-file.jar .\PeopleSoft\Generated\CompIntfc\*.class

    Where appropriate, substitutions are made for my-java-home and my-jar-file.

  5. To verify that your JAR file is correct, open it with the WinZip application.

    The following image shows the PeopleSoft JAR files opened in the WinZip application.

  6. If the JAR file does not use the following case-sensitive path, you must go back and correct it:
    PeopleSoft\Generated\CompIntfc\ 
  7. Place the JAR file in the common lib directory.

    This enables the iWay Application Adapter for PeopleSoft to communicate with the PeopleSoft Component Interface.

    For the current Windows NT version of the product, the default location is

    iWay61\lib

    For UNIX, the location is

    iWay61/lib

    where:

    iWay61

    Is the full path to your iWay installation.

    For more information, see the iWay Installation and Configuration manual.


iWay Software