Try thumbnailator: http://code.google.com/p/thumbnailator/. All the code you need to add is:
Thumbnails.of(new File("path/to/directory").listFiles())
.size(640, 480)
.outputFormat("jpg")
.toFiles(Rename.PREFIX_DOT_THUMBNAIL);
It's also fast: https://github.com/coobird/thumbnailator/wiki/Comparison
Good luck