diff -Nru openjdk-boot.orig/jdk/make/tools/src/build/tools/charsetmapping/DBCS.java openjdk-boot/jdk/make/tools/src/build/tools/charsetmapping/DBCS.java
--- openjdk-boot.orig/jdk/make/tools/src/build/tools/charsetmapping/DBCS.java	2010-05-04 14:24:56.000000000 +0100
+++ openjdk-boot/jdk/make/tools/src/build/tools/charsetmapping/DBCS.java	2010-05-04 14:34:01.000000000 +0100
@@ -27,7 +27,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.*;
@@ -39,9 +38,8 @@
 
     public static void genClass(String args[]) throws Exception {
 
-        Scanner s = new Scanner(new File(args[0], args[2]));
-        while (s.hasNextLine()) {
-            String line = s.nextLine();
+        BufferedReader s = new BufferedReader(new FileReader(new File(args[0], args[2])));
+        for (String line = s.readLine(); line != null; line = s.readLine()) {
             if (line.startsWith("#") || line.length() == 0)
                 continue;
             String[] fields = line.split("\\s+");
@@ -188,14 +186,13 @@
         String b2cNR = b2cNRSB.toString();
         String c2bNR = c2bNRSB.toString();
 
-        Scanner s = new Scanner(new File(srcDir, template));
+        BufferedReader s = new BufferedReader(new FileReader(new File(srcDir, template)));
         PrintStream ops = new PrintStream(new FileOutputStream(
                              new File(dstDir, clzName + ".java")));
         if (hisName == null)
             hisName = "";
 
-        while (s.hasNextLine()) {
-            String line = s.nextLine();
+        for (String line = s.readLine(); line != null; line = s.readLine()) {
             if (line.indexOf("$") == -1) {
                 ops.println(line);
                 continue;
