# How to set $GATLING\_HOME

**URL:** <https://community.gatling.io/t/how-to-set-gatling-home/2689>\
**Category:** Gatling (Open-Source)\
**Created:** [December 2, 2015, 2:35pm UTC](https://community.gatling.io/t/how-to-set-gatling-home/2689 "2015-12-02T14:35:25Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![L\_Becker](https://avatars.discourse-cdn.com/v4/letter/l/aeb1de/32.png) [@L\_Becker](https://community.gatling.io/u/L_Becker)\
**Post date:** [December 2, 2015, 2:35pm UTC](https://community.gatling.io/t/how-to-set-gatling-home/2689/1 "2015-12-02T14:35:25Z")

</div>

I’m trying to run recorder.sh on Mac OSX via Terminal. It seems $GATLING\_HOME is not being set to my `pwd` path as the script suggests it should be, so I get the following error:

`

HQSML-335402:gatling-chart-highchart-bundle-2.1.7 myMac$ sh recorder.sh

GATLING\_HOME is set to /

Error: Could not find or load main class io.gatling.recorder.GatlingRecorder

`

If I do pwd in Terminal, I get:

/Users/lbecke001c/Downloads/gatling-charts-highcharts-bundle-2.1.7

How do I set $GATLING\_HOME?

---

<div class="post-metadata">

**Author:** ![Greg\_Hinsley](https://avatars.discourse-cdn.com/v4/letter/g/a9adbd/32.png) [@Greg\_Hinsley](https://community.gatling.io/u/Greg_Hinsley)\
**Post date:** [December 2, 2015, 3:04pm UTC](https://community.gatling.io/t/how-to-set-gatling-home/2689/2 "2015-12-02T15:04:42Z")

</div>

recorder.sh and gatling.sh are both in the bin folder under the root gatling directory… cd into there and try again

---

<div class="post-metadata">

**Author:** ![L\_Becker](https://avatars.discourse-cdn.com/v4/letter/l/aeb1de/32.png) [@L\_Becker](https://community.gatling.io/u/L_Becker)\
**Post date:** [December 2, 2015, 3:23pm UTC](https://community.gatling.io/t/how-to-set-gatling-home/2689/3 "2015-12-02T15:23:09Z")

</div>

Same problem in /bin: $GATLING\_HOME is not being set properly. How do I set it?

HQSML-335402:bin lbecke001c$ ./recorder.sh

GATLING\_HOME is set to /

Error: Could not find or load main class io.gatling.recorder.GatlingRecorder

HQSML-335402:bin lbecke001c$ ./gatling.sh

GATLING\_HOME is set to /

find: //lib: No such file or directory

Error: Could not find or load main class io.gatling.app.Gatling

---

<div class="post-metadata">

**Author:** ![aidylewis](https://avatars.discourse-cdn.com/v4/letter/a/e9a140/32.png) [@aidylewis](https://community.gatling.io/u/aidylewis)\
**Post date:** [December 2, 2015, 3:33pm UTC](https://community.gatling.io/t/how-to-set-gatling-home/2689/4 "2015-12-02T15:33:37Z")

</div>

I have not been following this, but can’t you:

export GATLING\_HOME=`pwd`

Or make life easier and switch to SBT:  
[https://github.com/BBC/gatling-load-tests](https://github.com/BBC/gatling-load-tests/%C2%A0)

---

<div class="post-metadata">

**Author:** ![L\_Becker](https://avatars.discourse-cdn.com/v4/letter/l/aeb1de/32.png) [@L\_Becker](https://community.gatling.io/u/L_Becker)\
**Post date:** [December 2, 2015, 7:28pm UTC](https://community.gatling.io/t/how-to-set-gatling-home/2689/5 "2015-12-02T19:28:56Z")

</div>

I had to explicitly write out my path to GATLING\_HOME in .bash\_profile. Thanks for pointing me in the right direction!

---

<div class="post-metadata">

**Author:** ![aidylewis](https://avatars.discourse-cdn.com/v4/letter/a/e9a140/32.png) [@aidylewis](https://community.gatling.io/u/aidylewis)\
**Post date:** [December 2, 2015, 9:07pm UTC](https://community.gatling.io/t/how-to-set-gatling-home/2689/6 "2015-12-02T21:07:12Z")

</div>

Yes, lasting environment variables in Unix need to be stored in a shell initialisation file.

But, also look at the Gatling SBT plugin example:  
[https://github.com/gatling/gatling-sbt-plugin-demo](https://github.com/gatling/gatling-sbt-plugin-demo)
