updated samples for new Java Viewer