this probably isnt the answer youre looking for, but for whatever reason, just removing the JAVA_HOME environment variable altogether solved this error for me