You have a semicolon at the end of the inner for statement. That ends the scope of jj there, so it is not visible inside the block.
Edit
You have solved the scope problem, but still have your for loop executing just
;
Remove the semicolon after the parenthesis!