设置JAVA_HOME [英] Setting JAVA_HOME

查看:213
本文介绍了设置JAVA_HOME的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在运行从命令行使用Java的程序时遇到问题。我收到一条消息,指出找不到Java.exe。





我已遵循找到信息。


I'm having a problem when running programs that use Java from the command line. I get back a message saying Java.exe could not be found.

I've followed the instructions found in several places for setting JAVA_HOME in Windows 7.

As can be seen in the image I'm pointing to the JDK folder as instructed, I've also tried several variations including linking to the bin folder(where java.exe is located).

What am I doing wrong, and how can I debug this.

EDIT:

Typing Set in Command Prompt outputs

解决方案

As many have mentioned I had to add...

C:\Program Files\Java\jdk_version\bin

...to the path variable.

However what was not mentioned and was stopping this from working was that I had to make sure java\bin directory is in the path statement before the windows\system32 directory, otherwise this will not work.

I was able to find the information here.

这篇关于设置JAVA_HOME的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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