diff options
Diffstat (limited to 'sources/scalac/util/ClassPath.java')
-rw-r--r-- | sources/scalac/util/ClassPath.java | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/sources/scalac/util/ClassPath.java b/sources/scalac/util/ClassPath.java index b083c5485b..574121b4cc 100644 --- a/sources/scalac/util/ClassPath.java +++ b/sources/scalac/util/ClassPath.java @@ -142,6 +142,19 @@ public class ClassPath { "' not found in classpath"); } + public java.io.File openJavaFile(String name) throws FileNotFoundException { + if (printSearch) + System.out.println("looking for " + name); + for (int i = 0; i < root.length; i++) { + if (printSearch) + System.out.println(" in " + root[i]); + java.io.File f = new File(root[i], name); + if (f.exists()) return f; + } + throw new FileNotFoundException("file '" + name + + "' not found in classpath"); + } + public String[] components() { return root; } |