try to support java dots server protocol
some fixes