Java client example