There is a lot of this here. I know that. Each one of these problems ends up being somebody setting the sys variable with a ; or /bin
Here is my error:
C:\Users\vakke\DarkBotDev3\DarkBotDev3>gradle build ERROR: JAVA_HOME is set to an invalid directory: C:\Program Files\Java\jdk_1.8.0_141 Please set the JAVA_HOME variable in your environment to match the location of your Java installation.