0

I am learning Hadoop. On my windows system java is installed at C:/Program files/Java , but the problem is, I believe the white space in program files.

After setting all hadoop configuration files, When I run the command namenode format it give the following error.

$ bin/hadoop namenode -format bin/hadoop: line 350: C:\Program
Files\Java\jdk1.7.0_71/bin/java: No such file or directory

So is there any way by which i can change the java folder location to C:/Java from C:/Program files/Java

Thanks.

8
  • need add your java folder's path to Windows PATH Commented Feb 26, 2016 at 6:38
  • You can copy "C:\Program Files\Java\jdk1.7.0_71" to "C:\Java\jdk1.7.0_71" directly and update your JAVA_HOME and PATH env variable according to the new path. Commented Feb 26, 2016 at 7:06
  • @Mahendra and update the registrey. Commented Feb 26, 2016 at 8:59
  • Per my understanding Hadoop will only look for JAVA_HOME env variable and java in PATH , not for any registry entry. So for Hadoop purpose registry updation can be ignored. Commented Feb 26, 2016 at 9:49
  • 1
    You need to use regedit to find the entries with the old path and edit them. (Welcome to Windows ;) Commented Feb 26, 2016 at 11:33

2 Answers 2

1

If you do not want to move your java installation, you can try following possibilities:

  1. set your java path within quotation
  2. use the ~ operand -> your path is then C:\Program~1\Java\jdk1.7.0_71
Sign up to request clarification or add additional context in comments.

1 Comment

copy pasted the java folder in desired manner and updated the env variable and it worked fine. and yes i'll see if using '~' will work or not. thanks
0

copy pasting the java folder to C:/Java from C:/Program files/Java and updating the environment variables with new path worked for me

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.