Process Builder cannot find the path specified, using AppData folder <p>This is probably a simple question, I'm fairly new to Java but in my search I haven't been able to figure out why exactly this code doesn't work.</p> <pre><code>String execLoc = ((System.getenv("APPDATA"))+"\\ARcraft\\exec\\"); ProcessBuilder getCrafting = new ProcessBuilder("Minecraft.exe"); getCrafting.directory(new File(execLoc)); getCrafting.start(); </code></pre> <p>When I run this, I get back:</p> <pre><code>Cannot run program "Minecraft.exe" (in directory "C:\Users\andrew\AppData\Roaming\ARcraft\exec"): CreateProcess error=2, The system cannot find the file specified </code></pre> <p>I've read other posts with similar issues, and tried a variety of solutions but the fixes that they use don't seem to do anything for me. I've confirmed the file is present and that it runs correctly when executed from the directory being fed back by the program when pasted in command prompt.</p>