I donβt think you can, at least not with Java. Being what the OS makes this definition, Java simply delegates to it and returns the result.
Have you tried to make sure your File object indicates where you think?
Update: if C: / some does not exist, you must create it before you can create C: / some / path. Or use mkdirs () as indicated.
source share