Create a job with a rake step that is to use the default rake installation and then run the job on a Windows agent that has one of the affected JREs in use. The job will fail with:
This appears to be caused by JDK-8016721 : (process) Behavior of %~dp0 in .cmd and .bat scripts has changed whereby affected JRE versions try to create a sub-process with:
...as previous versions of the JRE used to.
When configuring a non-default rake installation, the path to the batch file will be absolute and this seems to not break rake.bat.