java.exe的没有被识别为内部或外部的命令 [英] java.exe is not recognized as an internal or external command

查看:221
本文介绍了java.exe的没有被识别为内部或外部的命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经看过一些帖子,但我不解决我的问题呢。

I have already read some posts but I cant solve my problem yet.

我的工作远程桌面和Windows Server 2008上在共享磁盘E:我把一些批处理文件。此批处理文件调用来自服务器的一个新的批处理文件,它运行的Java 脚本。现在我走的这条消息。

I am working on a remote desktop and windows server 2008. In the shared disk E: I put some batch file. This batch files call a new batch file from server which runs java script. And now I am taking the this message.

java.exe的不被识别为一个内部或外部命令,可操作的程序或批处理文件

我尝试设置环境,如:

先设定JRE7到E盘

二创建新的用户变量,它的名字叫 JAVA_HOME 和路径是我的JRE路径 E:\\工具\\ BatFiles

Second create new user variable which name is JAVA_HOME and which path is my JRE path E:\Tool\BatFiles

但我仍然采取这种错误。我应该在哪里做错了?

But I am still taking this error. Where should I do wrong ?

推荐答案

设置JAVA_HOME是一个很好的一步,有了它,你应该能够运行Java如下:

Setting JAVA_HOME is a good step, and with it you should be able to run Java as follows

%JAVA_HOME%/java myProgram arg0

如果您不希望包括%JAVA_HOME 在你的命令,你必须把它列入你的 PATH 。 Windows将检查它的 PATH 为斌脚本每一个命令被称为时间。一个典型的Java安装这是否适合你。

If you don't want to include %JAVA_HOME in your command, you will have to include it in your PATH. Windows checks it's PATH for bin scripts every time a command is called. A typical Java installation does this for you.

您可以修改 PATH 包括;%JAVA_HOME%结尾。重新启动的命令提示符更改生效。

You can edit your PATH to include ;%JAVA_HOME% at the end. Restart your command prompt for changes to take effect.

修改1
然而,你的编辑工作路径时,要小心!窗户取决于它在很多方面发挥作用。你可以期望探险停止工作。确定改变你 PATH 变量之前,请,你背起来的地方。以防万一。

Edit 1 Be careful when editting your PATH however! Windows depends on it to function in many aspects. You can expect explorer to stop working. Make sure before altering your PATH variable, that you back it up somewhere. Just in case.

这篇关于java.exe的没有被识别为内部或外部的命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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