classpaths are modified to remove unrelated packages.