# Problem running .bat from jenkins with Java error

**URL:** <https://community.gatling.io/t/problem-running-bat-from-jenkins-with-java-error/4294>\
**Category:** Gatling (Open-Source)\
**Created:** [April 23, 2018, 11:30pm UTC](https://community.gatling.io/t/problem-running-bat-from-jenkins-with-java-error/4294 "2018-04-23T23:30:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ken\_Clemson](https://avatars.discourse-cdn.com/v4/letter/k/6bbea6/32.png) [@Ken\_Clemson](https://community.gatling.io/u/Ken_Clemson)\
**Post date:** [April 23, 2018, 11:30pm UTC](https://community.gatling.io/t/problem-running-bat-from-jenkins-with-java-error/4294/1 "2018-04-23T23:30:06Z")

</div>

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

```auto
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.

```

```auto

```

```auto
Im trying to run the following in my pipeline in Jenkins

```

```auto

```

```auto
stage('LoadTest') {
            steps {
                node('Test01')
                {
                    dir('WebTesting\\Gatling_LoadTesting\\bin')
                    {
                        bat 'gatling -s google'
                    }
                }
            }
        }

```

```auto

```

```auto
This error only happens with I run it from Jenkins and works fine when I run it from a .bat,

```

```auto
Has anyone had this error before ?

```

---

<div class="post-metadata">

**Author:** ![Ken\_Clemson](https://avatars.discourse-cdn.com/v4/letter/k/6bbea6/32.png) [@Ken\_Clemson](https://community.gatling.io/u/Ken_Clemson)\
**Post date:** [April 24, 2018, 12:42am UTC](https://community.gatling.io/t/problem-running-bat-from-jenkins-with-java-error/4294/2 "2018-04-24T00:42:39Z")

</div>

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