Error while running hadoop commands "Unrecognized option -". Could not create Java Virtual Machine

1k Views Asked by At

I am trying to create hadoop 3.1 cluster on Ubuntu 18 machine. I am following the steps given here Hadoop cluster steps and currently I setup only one machine but when I tried to run commands like "hadoop version" or "hdfs namenode -format" I am getting following error:

*Unrecognized option: -

Error: Could not create the Java Virtual Machine.

Error: A fatal exception has occurred. Program will exit.*

Error Image

0

There are 0 best solutions below