Compiling a Java PAPI Program

The following procedures show you how to compile from the command line a Java class that uses PAPI.

To compile a Java PAPI program from the command line you need to have a Java SE Development Kit 5 (JDK 5) installed. You can download the JDK from Sun Developer Network. You may also use the JDK bundled with some installations of Oracle BPM Enterprise, which gets installed under BEA_HOME/albpm6.0/enterprise/jre/.

PAPI classes are contained in the fuegopapi-client.jar JAR file, which is distributed with Oracle BPM Enterprise under BEA_HOME/albpm6.0/enterprise/client/papi/lib/fuegopapi-client.jar.

  1. Open a command-line session.
  2. Add the PAPI library to the classpath by setting the environment variable CLASSPATH. The way of doing this depends on your operating system.
    • Linux:

      $export CLASSPATH="/bea/albpm6.0/enterprise/client/papi/lib/fuegopapi-client.jar"
                                      
    • Windows:

      C:>set CLASSPATH="C:/bea/albpm6.0/enterprise/client/papi/lib/fuegopapi-client.jar"
                                      
  3. Compile the Java PAPI program using javac (Java Compiler) provided by the JDK:
    javac MyFirstPapiApplication.java

    These two steps can be merged into one by using the -classpath option when calling the java compiler:

    javac -classpath "C:/bea/albpm6.0/enterprise/client/papi/lib/fuegopapi-client.jar" MyFirstPAPIApplication.java
                        

A file with the extension .class is generated in the directory where you compiled your program.