Convert many examples to java backend

**do not review yet**