updated for java viewer 1.4