通过命令提示符下运行(可能路径错误?) [英] Running through command prompt( Possibly Path error?)

查看:253
本文介绍了通过命令提示符下运行(可能路径错误?)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

从记事本编译我的code ++时当我编译的例子(javac的StudentApp.java)我有一个问题。它不会编译而是我得到这个错误code - 不被识别为一个内部或外部命令可操作的程序或批处理文件。
现在好了8.1 - 我使用Windows 8。
这是我的路径:

I have a problem when compiling my code from Notepad++ when i compile example( javac StudentApp.java). It does not compile but instead i get this error code - "is not recognised as an internal or external command operable program or batch file". I use Windows 8 - well 8.1 now. This is my path:

C:\Program Files (x86)\AMD APP\bin\x86_64;C:\Program Files (x86)\AMD APP\bin\x86;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Windows Live\Shared;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;append

如果有人可以帮助我将不胜AP preciate它。谢谢你。

If anyone could help I would greatly appreciate it. Thanks.

推荐答案

首先要确保你已经安装了JDK,而不是JRE(JRE来不使用javac)。

First be sure you have installed JDK , but not the JRE (jre comes without the javac).

下面是你如何通过在 JAVA_HOME \\ BIN 以您的路径(如果你已经安装了JDK):

Here's how you can the JAVA_HOME\bin to your path (in case you have installed JDK):

for /f  "delims=" %j in ('reg query "HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Development Kit\1.6" /v JavaHome') do @set jreg=%j
set jreg=%jreg:    JavaHome    REG_SZ    =%
setx PATH "%jreg%\bin";%PATH%

这篇关于通过命令提示符下运行(可能路径错误?)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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