Getting Android build errors.

I have the latest (just downloaded them) JDK and Android Tools (not studio) installed. But when trying to build android build, I get these 2 errors (they are 2 copies of the same error?!):

You know what, after 5 hours of struggle I’ve finally figured it out.
Have no idea what was wrong, but just re-installed JDK and A SDK and everything is fine now.