add Java library code