c:program files (x86)java,在Intellij IDEA 14.1.4中:无法运行程序“C:/ Program Files(x86)/Java/jdk1.8.0_45/bin/...

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 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.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值