Java:系统找不到文件C:\ ... java.exe [英] Java: System cannot find the file C:\ ... java.exe

查看:900
本文介绍了Java:系统找不到文件C:\ ... java.exe的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经安装了Java 8并设置了我的 JAVA_HOME JRE_HOME 路径并添加了% JAVA_HOME%路径变量的开头。

I have installed Java 8 and set my JAVA_HOME and JRE_HOME paths and added %JAVA_HOME% to the start of the path variable.

我创建了一个helloworld。 java应用程序,并能够使用以下方法编译它:

I created a helloworld.java application and am able to compile it using:

javac helloworld.java

但是,当我尝试运行时:

However, when I try to run:

java helloworld

java helloworld

我收到错误:

The system cannot find the file C:\ProgramData\Oracle\Java\javapath\java.exe

我该如何解决这个问题?

How can I solve this?

推荐答案

只需将%JAVA_HOME% / bin 设置为您的路径变量。

Just set %JAVA_HOME%/bin to your path variable.

这篇关于Java:系统找不到文件C:\ ... java.exe的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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