To calculate the disk size on your remote machine, you need a connection to your remote machine (obviously). The difficult question is how to establish this connection. As for any problem, there are some different solutions:
Mount the drive as a remote folder
If you can (I don't know if you can or want) mount the remote folder as a shared folder on your Windows machine. If you do so, you can just use our code as it is by changing the path of the file to the mounted folder. But this solution could be unpracticle and is not a "Java" solution.
Use an agent on your remote machine
Windows lacks of a solution like Linux's SSH to connect to a machine. So there is no easy way to connect to Windows machine. There are some tools like IBM's STAF (see here) which address this problem. You install STAF on the remote machine and on your local machine and can connect trough it. But it is a pretty ugly solution and is super insecure. But for a test system maybe enough.
Write your own service
There is no way to connect to a Windows machine (correct me if I am wrong) and tools like STAF are just bad workarounds. As you also concern about performance, I suggest you just deploy your tool to your Windows machine and provide a JSON-API on top of it. So you can take your browser, go to the machine and see how much space is left.
I know that's not what you hopped to hear, but you will have a bad time when you try to connect to a Windows machine...