Make sure you are using Java 8
In the start script, replace the word java with the java 8 path to the javaw.exe and put it into quotation marks
For example:
"C:\Program Files\Java\jre1.8.0_311\bin\javaw.exe" -Xmx8G -Xms8G -jar forge-1.12.2-14.23.5.2860.jar
pause