updates to javacomplete

I made some changes to help javacomplete work under cygwin.

I also merged in some changes from itszero and tlvince.