'Is there a way to override System.getProperty("java.io.temp");

Is there any way by which I can override this System.getProperty("java.io.temp")? For now, my code is trying to create files in the path which is returned by System.getProperty("java.io.temp") (which is C: drive), to which it does not have access. So I want to change the path to D: drive.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source