Oh, the APPDATA environment variable? Cool. Glad to hear the original code is now working.
The following is just in case someone else views this thread.
I just ran that Java file under Windows. I had to do two things.
1. Created a cmd file to call Java. Just be careful passing arguments with spaces in the name.
2. Specifiy the path to smvi.exe as the working directory and the full path to smvi.exe as the file/script to run.
For some reason, on Windows, it would not pick up just 'smvi.exe' in the working directory. One I did these, the same Java code ran without issues.