设置环境变量后找不到javac [英] javac not found after set environment variable

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

问题描述

我正在Windows 7机器上运行。

I am running on a windows 7 machine.

我安装了java jdk 1.7。

I installed java jdk 1.7.

将Path和PATH环境变量设置为指向java jdk 1.7 / bin目录。

I have set the Path and PATH environment variable to point to the java jdk 1.7/bin directory.

在命令提示符下执行java -version会产生java版本1.7.0_45 ...

executing java -version in the command prompt yields java version 1.7.0_45 ...

然而当我执行javac它说javac不被识别为内部或外部命令...

however when I execute javac it says that javac is not recognized as an internal or external command ...

我真的很难这个问题。我真的很想尽快解决这个问题。如果有人经历过类似的问题,可以分享一下。

I am really stumped on this problem. I really want to get this resolved ASAP. If anyone has experienced similar issues can you please share.

所有其他线程似乎都是通过更改环境变量来解决类似的问题,但这并不能解决我在这种情况下的问题。

All other threads seem to get similar issues resolved via changing the environment variable but this is not solving my problem in this situation.

编辑:当我在Console2中运行java -version时,它表示当前使用的java版本是1.6,我不知道为什么会这样。

when I run java -version in Console2 it says that the currently used version of java is 1.6 and I am not sure why this is the case.

推荐答案

不确定是否是原因,但在您发布的路径中

Not sure if this is the cause, but in the path you posted

C:\Program Files\Java\jdk1.7.0_45 \bin

C:\Program Files\Java\jdk1.7.0_45 \bin

看起来像jdk1.7.0_45之间的额外空间和\bin

Looks like an extra space in between of "jdk1.7.0_45" and "\bin"

此外,追加;

PATH = C:\Program Files\Java\jdk1.7.0_45\bin;

PATH = C:\Program Files\Java\jdk1.7.0_45\bin;

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

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