def reorder_classpath(self, classpath_file):
        success = False

        with catch((IOError, OSError), lambda e: None):
            with open(classpath_file, "r") as f:
                classpath = f.readline()

            # Proceed if classpath is non-empty
            if classpath:
                units = classpath.split(":")
                reordered_units = []
                for unit in units:
                    if "monkeys" in unit:
                        reordered_units.insert(0, unit)
                    else:
                        reordered_units.append(unit)
                reordered_classpath = ":".join(reordered_units)

                with open(classpath_file, "w") as f:
                    f.write(reordered_classpath)

            success = True

        return success
Reorder classpath and put monkeys-jar in the first place.
dataset/ETHPy150Open ensime/ensime-vim/ensime_shared/launcher.py/EnsimeLauncher.reorder_classpath