Problem running .bat from jenkins with Java error

Hi I’m try to run my Gatling simulation from jenkins pipeline and I’m getting a weird java error:

C:\Jenkins\workspace\WebTests\WebTesting\Gatling_LoadTesting\bin>gatling -s google 
GATLING_HOME is set to "C:\Jenkins\workspace\WebTests\WebTesting\Gatling_LoadTesting"
JAVA = "java"
Error: opening registry key 'Software\JavaSoft\Java Runtime Environment'
Error: could not find java.dll
Error: Could not find Java SE Runtime Environment.

Im trying to run the following in my pipeline in Jenkins

stage('LoadTest') {
            steps {
                        bat 'gatling -s google'

This error only happens with I run it from Jenkins and works fine when I run it from a .bat,
Has anyone had this error before ?

Ahh is it because I need the JDK not the JRE ?