Japanese version is here.
The School Education Law rules as " Principals and teachers will administer punishment to
students, but shall not administrate corporal punishment to them."
In this case, these two punishments are not divided by a line of legality, but there is a zone
like the "Play" of the steering wheel of a car, so whenever the teacher or the principal will use
such force on the student as the way of punishment that would be legal discipline of the
student and is lawful for them.

And the " Play " is different from the length and the width between the track, the standard car,
the small car and others, therefor, the principal or the teacher should consider carefully about
the age, gender, strength of the body, mental issue, maturity of the student in their adminiatration
of the physical punisnment.
1. To use reasonable force
T  Public Poll of corporal punishment in Japan
                        January 10.1978
1. In some cases, moderate corporal punishment is necessary
  for the good discipline of a student ...................................................... 33.8 %

2. Whenever there is a good mutual relationship between teacher
  and student, corporal punishment is permitted............................ 44.7 %

3. Even if there is a good mutual relationship between teacher
  and student, corporal punishment is not permitted.....................  7.6 %

4. In any case, corporal punishment by the tescher is not
  permitted.............................................................................................  5.4 %

5. No answer s..........................................................................................  8.5 %

( Source: S.Maki," Discipline of student & corporal punishment ), Rodo P.   
Morikatsu Imahashi, " Educational Research of corporal punsiment " Rodo No.27
U Parents opinion of corporal punishment in Japan
                       August in 1996
1. According to circumstances, corporal punishment by the teacher
  is permitted to some degree.................................................................... 52.2%

2. Corporal punishment is necessary for a good discipline ................ 17.0 %

3. In any case, corporal punishment by the teacher is not
  permitted....................................................................................................... 25.6 %

4. Others ........................................................................................................... 3.5 %

5. No answers ................................................................................................   5.4 %

( Source: All Japan PTA Conference & Asahi Shinbun, August 21, 1996 )