Fix exit routine in java viewer

Some exceptions were causing all viewers to exit, not just the
one that threw the exception.
1 file changed