Convert many examples to java backend

**do not review yet**
most likely in order to fix this we will have to abandon xml in favor of a different markup language. I think that could be worthwhile, but not inside the scope of this diff.