Removed System.exit() from Java example programs