not able to run BLDC with ESC

i have a 35A ESC and a outrunner BLDC… i have connected the red and black wires of the ESC to a 9V battery for power supply . On the other side ive connected the red black and yellow wires of the BLDC. The white wire of 3 pin connector is connected to pin 9 and black to ground. i havent connected the red wire as the arduino is powered by a computer.
this is the program i ran
#include <Servo.h>
int i=0;
Servo esc;
void setup()
{
esc.attach(9);

}
void loop()
{
while(i<179)
{
esc.write(i);
i++;
}
if (i == 179)
{
i=0;
}
}
the motor is not running.
im new to electronics… could someone tell me what i did wrong

You can't even begin to think about powering an ESC for an RC motor from a 9V battery, you need a hefty lithium or NiMH or SLA pack capable of tens of amps without undue stress.

Perhaps the clue is the phrase "35A ESC"??

9V battery is good for, say 0.1A for a few seconds, completely completely inadequate.