Problem running .bat from jenkins with Java error

12 views
Skip to first unread message

Ken Clemson

unread,
Apr 23, 2018, 7:30:06 PM4/23/18
to Gatling User Group
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 {
                node('Test01')
                {
                    dir('WebTesting\\Gatling_LoadTesting\\bin')
                    {
                        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 ?

Ken Clemson

unread,
Apr 23, 2018, 8:42:39 PM4/23/18
to Gatling User Group
Ahh is it because I need the JDK not the JRE ?
Reply all
Reply to author
Forward
0 new messages