Splitted examples and adapted to new Java API

Added dedicated example pages for the Java and Scala API.

Please check and give feedback.