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.*