how can compile cpp code containing references to java classes

hi
there is example (on link given below )of such code that contains java class reference in c++ program.

http://slackware.cs.utah.edu/pub/slackware/slackware-7.1/docs/Linux-HOWTO/Process-Monitor-HOWTO

I am new in linux environment. and not able to compile it.
when i compile it through gcc it gives error regarding java classes like StringTokenizer.
plz tell how i can compile such code.

I can't find any references to Java stuff at the link you mentioned. By the way, the code is C, not C++.

I'm not sure if that is what you meant, but integrating Java and C/C++ code involves the Java Native Interface (JNI). I was once engaged in heavy JNI work about 6 years ago at college but have almost entirely forgotten most of it, because I have forgotten most of C/C++ myself.

The coverage of JNI has been stripped of the Sun Java tutorial for many years, probably due to lack of interest. If you want to find more information, you will need to search for older documents. I dug this up in an early version of the Java tutorial:

Integrating Native Code and Java Programs

Good luck, because it is very easy to crash the JVM with JNI.