added java example for init(Context context)