You need to create a bootstrap job which will be executed by Play at application start time.
@OnApplicationStart
public class Bootstrap extends Job {
public void doJob() {
//do stuff
}
}
Read more about how to do this in the Play Manual.