resolve app name from app path and app path from app name
get_instances can be a list of classes in string format or classes