简体   繁体   English

与Windows的“路径变量”中Java的“ bin”目录混淆-如何解决此问题?

[英]Confusion with Java's “bin” directory in Windows' Path Variable - How can I fix this?

So on my server running Windows Server 2008 x64 R2 I installed the Java JDK 7 Update 5. I added "C:\\Program Files\\Java\\jdk1.7.0_05\\bin" to the System "Path" variable. 因此,在运行Windows Server 2008 x64 R2的服务器上,我安装了Java JDK 7 Update5。我向系统“ Path”变量中添加了“ C:\\ Program Files \\ Java \\ jdk1.7.0_05 \\ bin”。

Now in console, certain Java executables like java.exe work, but others like javac.exe only work whenever I'm actually in that "bin" directory. 现在,在控制台中,某些Java可执行文件(如java.exe)可以工作,但其他javac.exe可执行文件仅在我实际位于该“ bin”目录中时才能工作。

Does anyone have a clue what I did wrong and how I can fix this? 有谁知道我做错了什么以及如何解决这个问题?

EDIT: Whenever I enter 'javac' it returns: 编辑:每当我输入'javac'它将返回:

'javac' is not recognized as an internal or external command,
operable program or batch file.

When I type 'PATH', I get: 当我输入“ PATH”时,我得到:

PATH=C:\PROGRA~2\PARALL~1\Plesk\ADDITI~1\Perl\site\bin;C:\PROGRA~2\PARALL~1\Ples
k\ADDITI~1\Perl\bin;C:\Program Files (x86)\Parallels\Plesk\Mail Servers\Mail Ena
ble\BIN;C:\Program Files (x86)\Parallels\Plesk\Additional\Python\Scripts;C:\Prog
ram Files (x86)\Parallels\Plesk\Additional\Python\;C:\zpanel\bin\apache\bin;C:\z
panel\bin\mysql\bin;C:\zpanel\bin\php;C:\zpanel\bin\wget;C:\zpanel\bin\bind\bin;
C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\Wind
owsPowerShell\v1.0\;c:\Program Files\Microsoft SQL Server\100\DTS\Binn";C:\Progr
am Files\MySQL\MySQL Server 5.5\bin;C:\Program Files (x86)\Parallels\Plesk\Mail
Servers\Mail Enable\BIN64;C:\Program Files\TortoiseSVN\bin;C:\Program Files (x86
)\Git\cmd;C:\Program Files\SlikSvn\bin;C:\Program Files\Java\jdk1.7.0_05\bin;

还创建带有Java路径的环境变量JAVA_HOME

Try this, 尝试这个,

For eg: 例如:

My JDK is located in my C:\\Program Files\\Java 我的JDK位于我的C:\\ Program Files \\ Java中

So you must do as following: 因此,您必须执行以下操作:

Copy C:\\Program Files\\Java\\jdk1.7.0\\bin , then goto your "Path" variable and set this...

And yes.. open you command prompt and give the following command..

gpupdate /force gpupdate / force

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在软件的bin目录前添加执行路径(PATH变量)? - How to prepend a software's bin directory to execution path( PATH variable)? 如何在不更改路径变量中的Java bin目录的情况下针对不同的应用程序使用不同的Java版本? - How to use different Java versions for different applications without changing the Java bin directory in path variable? 如何在Windows路径系统中添加Java bin文件夹路径 - How to add Java bin folder path in Windows path system 如何在Windows上的Java应用程序中设置/更新PATH变量? - How can I set/update PATH variable from within java application on Windows? AWS S3 listFiles-如何获取目录路径? - AWS S3 listFiles - How can i get directory path? 如何在Java Web应用程序中提及目录路径 - How can I mention directory path in Java web-Application mvn -version显示-bash:/ usr / local / bin / mvn:没有这样的文件或目录。 知道我该如何解决吗? - mvn -version is displaying -bash: /usr/local/bin/mvn: No such file or directory. Any idea how I can fix this? 有关Java软件包和Windows目录的困惑? - Confusion regarding Java Packages and Windows Directory? 我可以使用 Active Directory 打开 Windows Enterprise 上用户主目录中的 Java 中的文件吗? - Can I open a file in Java that is in a user's home directory on Windows Enterprise with Active Directory? 如何解决 MySql 的 JSON 和 Java 的编码问题? - How can I fix encoding issues with MySql's JSON and Java?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM