简体   繁体   English

Hadoop '-classpath' 不是内部或外部命令,也不是可运行的程序或批处理文件

[英]Hadoop '-classpath' is not recognized as an internal or external command, operable program or batch file

I'm trying to install hadoop on my computer (Windows 10, 64 bit) but when I go to test if it installed, I keep getting the error:我正在尝试在我的计算机(Windows 10、64 位)上安装 hadoop,但是当我去测试它是否安装时,我不断收到错误消息:

'-classpath' is not recognized as an internal or external command, operable program or batch file. '-classpath' 不是内部或外部命令,也不是可运行的程序或批处理文件。

I have no idea why this is happening.我不知道为什么会这样。 I thought my system variables were set correctly but apparently not.我以为我的系统变量设置正确,但显然没有。 I was just wondering if anyone could tell me what is going on with this -classpath stuff.我只是想知道是否有人可以告诉我这个 -classpath 的东西发生了什么。 Below is a snapshot of the error下面是错误的快照

enter image description here在此处输入图片说明

And here are further images of my stem and path variables.这是我的词干和路径变量的进一步图像。 As well as a snapshot of the bin directory in hadoop.以及 hadoop 中 bin 目录的快照。

enter image description here在此处输入图片说明

enter image description here在此处输入图片说明

For me the problem was that %JAVA_HOME% included a space in the path C:\\Program Files\\Java\\jdk1.8.0_191 .对我来说,问题是%JAVA_HOME%在路径C:\\Program Files\\Java\\jdk1.8.0_191包含一个空格。 After changing it to C:\\Progra~1\\Java\\jdk1.8.0_191 it started to work.将其更改为C:\\Progra~1\\Java\\jdk1.8.0_191它开始工作。 So check that all the relevant env variables (Java, Hadoop) are defined without spaces.因此,请检查所有相关的env变量(Java、Hadoop)是否都定义为没有空格。

You have problem with your path .你的路径有问题。 Your path contains some spaces.您的路径包含一些空格。 Just remove the spaces .只需删除空格。 Suppose any folder name in your path is like假设您路径中的任何文件夹名称都类似于

Hadoop folder Hadoop文件夹

You can clearly see the space in your folder name in your path so you just rename the folder name as您可以清楚地看到路径中文件夹名称中的空格,因此您只需将文件夹名称重命名为

Hadoopfolder Hadoop文件夹

Or或者

Hadoop-folder Hadoop 文件夹

Just rename it everywhere and try to install it again .只需在任何地方重命名它并尝试再次安装它。

暂无
暂无

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

相关问题 'appletviewer' 不是内部或外部命令,也不是可运行的程序或批处理文件 - 'appletviewer' is not recognized as an internal or external command, operable program or batch file 'wsgen'不被识别为内部或外部命令,可操作程序或批处理文件 - 'wsgen' is not recognized as an internal or external command, operable program or batch file 'scomp' 不是内部或外部命令,也不是可运行的程序或批处理文件 - 'scomp' is not recognized as an internal or external command, operable program or batch file 'mvn' 不是内部或外部命令,也不是可运行的程序或批处理文件 - 'mvn' is not recognized as an internal or external command, operable program or batch file 错误 -'javac' 不是内部或外部命令,也不是可运行的程序或批处理文件 - Error -'javac' is not recognized as an internal or external command, operable program or batch file 'cmd'未被识别为内部或外部命令,可操作程序或批处理文件 - 'cmd' is not recognized as an internal or external command, operable program or batch file VSCode 'java' 不是内部或外部命令,也不是可运行的程序或批处理文件 - VSCode 'java' is not recognized as an internal or external command, operable program or batch file 错误 - jar 不是内部或外部命令、可运行的程序或批处理文件 - Error - jar is not recognized as an internal or external command, operable program or batch file 'jar' 不是内部或外部命令、可运行程序或批处理文件错误 - 'jar' is not recognized as an internal or external command, operable program or batch file error 'java' 不是内部或外部命令、可运行程序或批处理文件 - 'java' is not recognized as an internal or external command, operable program or batch file
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM