You are starting your substring search from the beginning each time. You also increment i only by one, rather than setting it to the start of the next token each time. Try the following:
String token;
int space = 1;
int i = 0;
while(space > 0)
{
space = str.indexOf(' ', i);
if (space > 0)
token = str.substring(i, space);
else
token = str.substring(i);
System.out.println("[" + token + "]");
i = space + 1;
}