在Intellij IDEA 14.1.4中:无法运行程序“C:/ Program Files(x86)/Java/jdk1.8.0_45/bin/java" [英] In Intellij IDEA 14.1.4: Cannot run program "C:/Program Files (x86)/Java/jdk1.8.0_45/bin/java"

查看:7323
本文介绍了在Intellij IDEA 14.1.4中:无法运行程序“C:/ Program Files(x86)/Java/jdk1.8.0_45/bin/java"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在IDEA中运行基于java的Play 2.0应用程序,但在编译时,我收到此错误:

I am trying to run a java-based Play 2.0 app in IDEA, but upon compilation, I get this error:


信息:内部缓存已损坏或格式已过时,
强制项目重建:模块'web-server'生产:
java.io.IOException:无法运行程序C:/ Program Files
( x86)/Java/jdk1.8.0_45/bin/java(在目录
C:\ Users \\Documents\GitHub \\web-server):
CreateProcess错误= 267,目录名无效

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

这发生在 ProcessBuilder.start() action。

This occurs during a ProcessBuilder.start() action.

我确保所有路径变量都已正确设置,甚至更改它们以确保它们正常工作。让我在这里的事情是,似乎ProcessBuilder正在尝试使用正斜杠路径,但我正在Windows中运行。

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.

我尝试从头开始重新加载项目,使缓存失效并重新启动,更新我的java安装(32位和64位),以及卸载和重新安装IDEA ,但它似乎不会起作用。这个项目在另一台计算机上运行正常,所以我认为这可能是一个本地问题。任何帮助将不胜感激!

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:

显然目录路径有问题。我的是D:\IntelliJ Workspace \,但错误信息是D:\IntelliJ + Workspace \。当我删除目录名称中的空格时,错误已得到修复。

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.

在您的情况下C:\ Users \\Documents\GitHub \\web -server有额外的反斜杠所以当你修复它时,我认为你的错误将被修复。

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.

这篇关于在Intellij IDEA 14.1.4中:无法运行程序“C:/ Program Files(x86)/Java/jdk1.8.0_45/bin/java"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆