use the java string to train