diff -r 5d5ee1c92a1b make/tools/src/build/tools/charsetmapping/EUC_TW.java
--- openjdk-boot.orig/jdk/make/tools/src/build/tools/charsetmapping/EUC_TW.java	Fri May 14 14:06:33 2010 +0100
+++ openjdk-boot/jdk/make/tools/src/build/tools/charsetmapping/EUC_TW.java	Mon May 17 20:40:10 2010 +0100
@@ -27,7 +27,6 @@
 
 import java.io.*;
 import java.util.ArrayList;
-import java.util.Scanner;
 import java.util.Formatter;
 import java.util.regex.*;
 import java.nio.charset.*;
diff -r 5d5ee1c92a1b make/tools/src/build/tools/charsetmapping/HKSCS.java
--- openjdk.orig/jdk/make/tools/src/build/tools/charsetmapping/HKSCS.java	Fri May 14 14:06:33 2010 +0100
+++ openjdk-boot/jdk/make/tools/src/build/tools/charsetmapping/HKSCS.java	Mon May 17 20:40:10 2010 +0100
@@ -28,7 +28,6 @@
 import java.io.*;
 import java.util.Arrays;
 import java.util.ArrayList;
-import java.util.Scanner;
 import java.util.Formatter;
 import java.util.regex.*;
 import java.nio.charset.*;
diff -r 5d5ee1c92a1b make/tools/src/build/tools/charsetmapping/Main.java
--- openjdk-boot.orig/jdk/make/tools/src/build/tools/charsetmapping/Main.java	Fri May 14 14:06:33 2010 +0100
+++ openjdk-boot/jdk/make/tools/src/build/tools/charsetmapping/Main.java	Mon May 17 20:40:10 2010 +0100
@@ -25,9 +25,6 @@
 
 package build.tools.charsetmapping;
 
-import java.io.*;
-import java.util.Scanner;
-
 public class Main {
 
     public static void main(String args[]) throws Exception {
diff -r 5d5ee1c92a1b make/tools/src/build/tools/charsetmapping/Utils.java
--- openjdk-boot.orig/jdk/make/tools/src/build/tools/charsetmapping/Utils.java	Fri May 14 14:06:33 2010 +0100
+++ openjdk-boot/jdk/make/tools/src/build/tools/charsetmapping/Utils.java	Mon May 17 20:40:10 2010 +0100
@@ -26,6 +26,7 @@
 package build.tools.charsetmapping;
 
 import java.io.File;
+import java.io.FileInputStream;
 import java.io.InputStream;
 import java.io.InputStreamReader;
 import java.io.OutputStream;
@@ -33,7 +34,6 @@
 import java.io.IOException;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
-import java.util.Scanner;
 import java.util.Formatter;
 
 public class Utils {
@@ -206,10 +206,11 @@
     }
 
     public static String getCopyright(File f) throws IOException {
-        Scanner s = new Scanner(f, "ISO-8859-1");
+        InputStreamReader r = new InputStreamReader(new FileInputStream(f),
+                                                    "ISO-8859-1");
+        BufferedReader s = new BufferedReader(r);
         StringBuilder sb = new StringBuilder();
-        while (s.hasNextLine()) {
-            String ln = s.nextLine();
+        for (String ln = s.readLine(); ln != null; ln = s.readLine()) {
             sb.append(ln + "\n");
             // assume we have the copyright as the first comment
             if (ln.matches("^\\s\\*\\/$"))
