replaced depricated java_sub with java cookbook