[java] added basic java example, needs more tests