Java - calculete termo batchs