Convert many examples to java backend

**please review**
I took care of it in this diff.