I followed the linked post and after opening the command prompt with the folder then entering java -Djava.net.preferIPv4Stack=true -jar forge-1.12.2-14.23.5.2768-installer.jar
When I hit enter it says
Error: Could not find or load main class .net.preferIPv4Stack=true
However the installer I downloaded is indeed in that folder.