Forge for 1.12.2 and earlier requires Java 8 specifically.
Besides that I’m having a hard time reading the log on mobile but make sure you get the latest version of Java 8 and see if you still get the error.
I'm a bit confused about how you think this works.
It sounds like you're under the impression that build/libs is a place where you put things in. Is this correct?