communication works between java and scala