You could convert the word documents by running the "wvText" program from you java-program (wc =
Word
View). Or read the sources of the program, if you want to do it java-only.
There's a whole family of wv... tools: wvLatex, wvCleanLatex, wvRTF, wvPDF, .... Chances are good they are already included with your distribution (at least Debian). If not get it from
http://wvware.sourceforge.net/