Python vs. Java Runtime on Euler 22 - Name Scores
Broadly speaking try creating less objects. ;)

You can


read the entire file as a series of lines or as a string with FileUtils.
iterate through each character rather than building an array which you iterate.
as the program is so short, try using -client which has shorter start time.


To maximise the performance

long start = System.nanoTime();
long sum = 0;
int runs = 10000;
for (int r = 0; r &lt; runs; r++) {
    FileChannel channel = new FileInputStream("names.txt").getChannel();
    ByteBuffer bb = channel.map(FileChannel.MapMode.READ_ONLY, 0, channel.size());
    TLongArrayList values = new TLongArrayList();

    long wordId = 0;
    int shift = 63;
    while (true) {
        int b = bb.remaining() &lt; 1 ? ',' : bb.get();
        if (b == ',') {
            values.add(wordId);
            wordId = 0;
            shift = 63;
            if (bb.remaining() &lt; 1) break;

        } else if (b &gt;= 'A' &amp;&amp; b &lt;= 'Z') {
            shift -= 5;
            long n = b - 'A' + 1;
            wordId = (wordId | (n &lt;&lt; shift)) + n;

        } else if (b != '"') {
            throw new AssertionError("Unexpected ch '" + (char) b + "'");
        }
    }

    values.sort();

    sum = 0;
    for (int i = 0; i &lt; values.size(); i++) {
        long wordSum = values.get(i) &amp; ((1 &lt;&lt; 8) - 1);
        sum += (i + 1) * wordSum;
    }
}
long time = System.nanoTime() - start;
System.out.printf("%d took %.3f ms%n", sum, time / 1e6);


prints

XXXXXXXXX took 27.817 ms


Its pretty obtuse, but works around the fact its not warmed up. 

You can tell this is the case because if you repeat the code in a loop 10000 times, the time taken is only 8318 ms or 0.83 ms per run.