
144 Java Stand-alone Applications on z/OS Volume II
export PATH=/usr/lpp/java/J5.0/bin:$PATH
export LIBPATH=./:$LIBPATH
b. Generate the object file:
cc -c -o JVMTIAgent.o -W c,exportall
-I/usr/lpp/java/J5.0/include JVMTIAgent.c
c. Build the shared library:
cc -o libTIAgent.so -W l,dll JVMTIAgent.o
d. Compile the Java simple test case:
javac JVMTITest.java
e. When users execute the agent, they will receive the following output:
$ java -agentlib:TIAgent JVMTITest
For more information about writing agents using JVMTI, refer to the following
sites:
http://java.sun.com/j2se/1.5.0/docs/guide/jvmti/jvmti.html
http://java.sun.com/developer/technicalArticles/Programmin ...