I want to run a java class from the command line (cmd) on windows with a parameter (path to a folder) that has utf-8 characters like this:
java <MyClass> "mypath/Časdf"
This produces the following error message:
Could not find the source folder: mypath\Casdf
As you can see, the first character Č
has changed to C
. This also happens with other special characters. I already tried the following:
- change the codepage of the windows cmd to 65001 before executing java
- execute java with option
-Dfile.encoding=UTF8
- execute java with PowerShell
- execute java in a Linux environment: no problem there, but I need to be able to execute it in Windows (and preferably with cmd)