index replace by main .java