Yes there are different alternatives of where quotes are needed in %~1 and %~2:
alt1: running a jar with blank in path; first param need quote handling:
scala "test blank/myJar.jar"

alt2: running a jar with blank in path for toolcp:
scala -toolcp "test blank/myJar.jar" "test blank/myJar.jar"

then the shift operation makes the nth parameter numberd as n-1 for all n...
So if AFAIK, the tilde is needed for both %1 and %2 
as any place where a path can be a parameter, space needs to be handled