Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8928675
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T08:29:56+00:00 2026-06-15T08:29:56+00:00

I am trying to configure Hadoop on my Windows 7 machine. I am able

  • 0

I am trying to configure Hadoop on my Windows 7 machine. I am able to start name node and other services, but as I am running an example which comes with the Hadoop package (version 1.0.3), following error is coming:

bin/hadoop: line 320 : C:\Program: Command not found. 

I ran the example with the following command:

bin/hadoop jar hadoop-examples-1.0.3.jar pi 10

I opened this hadoop file in which error is coming and found that in line 320
a path is being generated:

JAVA_PLATFORM=`CLASSPATH=${CLASSPATH} ${JAVA} -Xmx32m ${HADOOP_JAVA_PLATFORM_OPTS} org.apache.hadoop.util.PlatformName | sed -e "s/ /_/g"`

So I am feeling that problem might be in this JAVA variable as Cygwin uses different conventions for path name. Has anyone also faced this problem or know what is causing the problem?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T08:29:57+00:00Added an answer on June 15, 2026 at 8:29 am

    Quick summary:

    • The hadoop bash script under (path)/bin/hadoop actually has a bug in it. The script assumes that none of the files / paths that hadoop needs will have spaces in them. Well, for anything Windows, they will all have a space somewhere, since “Program Files” has a space in it.

    Details

    This is a tricky one… I ran into the same problem and it took me a while to fix.

    First, the problem: setting environment variables via scripts can get sketchy when spaces are involved in the file paths / names (which occurs fairly often in non-*nix systems these days).

    Next, there are likely two places where you need to fix the problem:

    1. In your (path)/conf/hadoop-env.sh script, you should be setting the JAVA_HOME script, and it SHOULD look something like:

      export JAVA_HOME=/cygdrive/c/"Program Files"/Java/jdk1.7.0_06
      

      (Note that there are quotation marks around the “Program Files”, so that it is recognized as a single element. You cannot use the \ escape character because cygwin does some finagling of Windows to UNIX paths, so the \ cannot act as escape.

    2. In your (path)/bin/hadoop script, line 320 is likely written something like the following:

      JAVA_PLATFORM=`CLASSPATH=${CLASSPATH} ${JAVA} -Xmx32m ${HADOOP_JAVA_PLATFORM_OPTS} org.apache.hadoop.util.PlatformName | sed -e "s/ /_/g"`
      

      You will need to change it to instead say:

      JAVA_PLATFORM=`CLASSPATH="${CLASSPATH}" "${JAVA}" -Xmx32m ${HADOOP_JAVA_PLATFORM_OPTS} org.apache.hadoop.util.PlatformName | sed -e "s/ /_/g"`
      

      Note that I have added quotation marks around the environment variables ${CLASSPATH} and ${JAVA}. By putting the quotation marks around it, you are saying that “the entire set of characters specified by this variable should be considered one string object”.


    OK, now if you care to understand why this is happening and what’s going on, the problem is that your JDK is likely stored under “Program Files”, or maybe under “Program Files (x86)”, both of which have spaces within the path. All the other environment variables that Hadoop needs are not dependent upon anything within the “Program Files” pathway. So that’s why you only see the one error being flagged. All the other environment variables which are missing the quotes simply don’t have spaces within them.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to configure my xmonad.hs so that when I start my session
I'm trying to configure a one to one relationship between entities which both have
I've been trying to configure the new Facebook Javascript API with my website, but
I'm currently learning hadoop and I'm trying to setup a single node test as
Trying to configure Jenkins CI. Currently just running it from the .war (eventual intention
Trying to configure apache2 to load example.com/forum/ from a different document root, relative to
Iam trying to configure nutch for running multi-threaded crawling. However , Iam facing an
I am new to Hadoop framework. I was trying to write a program which
Trying to configure NUnit 2.5.8.10295 in Cruise Control.NET on Windows Server 2008 R2, .NET
I am trying to configure my laptop to be able to Wake On LAN

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.