Rewrite Classpath.scala using Java for clarity