About the charset.
I used to force JVM using UTF-8 by adding "-Dfile.encoding=UTF-8".
Just a moment ago, I disabled it and somehow it works. Looks like Powershell can print UTF-8 in GB2312 env, but it's the Java's File returns what the filesystem gives it, in this case it might be GB2312. Forcing JVM running in UTF-8 will make it think that is a UTF-8 string, instead of translate from GB2312.
And, in Windows, even your terminal is UTF-8, you still got GB2312 filenames from the fs.
And, somehow, the fs can take UTF-8 filenames and handle it correctly. Then why not use UTF-8 by default? Why?