Java can't be used directly. Need to write a Java class for it.
This is a library written in C/C++ that calls into JAVA runtime.
Java code can then use this class, like:
winamp = new CWinampClass;
I know someone has written one. My memory is lost, so doesn't know
where to seek.