I am trying to run a java-based Play 2.0 app in IDEA, but upon compilation, I get this error:
Information:Internal caches are corrupted or have outdated format, forcing project rebuild: Module 'web-server' production: java.io.IOException: Cannot run program "C:/Program Files (x86)/Java/jdk1.8.0_45/bin/java" (in directory "C:\Users\\Documents\GitHub\\web-server"): CreateProcess error=267, The directory name is invalid
This occurs during a ProcessBuilder.start()
action.
I have made sure all the path variables are properly set, even changing them up to ensure that they work properly. The thing that gets me here is that it seems like ProcessBuilder is trying to use forward slash paths, but I'm running in Windows.
I've tried reloading my project from scratch, invalidating the cache and restarting, updating my java installation (both 32- and 64-bit), and uninstalling and reinstallating IDEA, but it just won't seem to work. This same project runs fine on another computer, so I'm thinking it might be a local issue. Any help would be greatly appreciated!
I had this problem recently, i solved in 2 steps.
Part 1
If your path JAVA_HOME is OK:
File → Settings → Build, Execution, Deployment → Build Tools → Maven → Runner
Set to "use JAVA_HOME (...Path...)"
If you set with a fixed string, the problem may reappear when in future you will re-update. Anyway, you can do that.
Part 2
File → Other Settings → Default Project Structure
Check all the tabs and ensure that all the path point to the newly installed JDK (If you change in one, then you should have all changed, e.g. i changed in Annotations)
If you cannot select the path (error: not valid path), try not to use the one in C:\Program Files (x86)\Java...\ -- select the one in C:\Program Files\Java...\ (or viceversa)
I had the same issue, here is how I solved it:
Clearly there is something wrong with the directory path. Mine was "D:\IntelliJ Workspace\" but in error message it was "D:\IntelliJ+Workspace\". When I remove the space in directory name the error was fixed.
In your situation "C:\Users\\Documents\GitHub\\web-server" has extra back slashes so when you fix this, I think your error will be fixed.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With