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

**URL:** <https://community.gatling.io/t/error-could-not-find-or-load-main-class-io-gatling-app-gatling/5570>\
**Category:** Gatling (Open-Source)\
**Created:** [April 2, 2020, 8:17pm UTC](https://community.gatling.io/t/error-could-not-find-or-load-main-class-io-gatling-app-gatling/5570 "2020-04-02T20:17:27Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rajesh\_V](https://avatars.discourse-cdn.com/v4/letter/r/839c29/32.png) [@Rajesh\_V](https://community.gatling.io/u/Rajesh_V)\
**Post date:** [April 2, 2020, 8:17pm UTC](https://community.gatling.io/t/error-could-not-find-or-load-main-class-io-gatling-app-gatling/5570/1 "2020-04-02T20:17:27Z")

</div>

When i am trying the below command to generate the report i was getting this error.

Please help me out to resolve the issue.

$ bash /c/Users/Admin/Desktop/Performance/Gatling\_Report/gatling-charts-highcharts-bundle-3.0.3/bin/gatling.sh -ro \Users\Admin\Desktop\Performance\Results\Promise-Eng  
ine  
GATLING\_HOME is set to /c/Users/Admin/Desktop/Performance/Gatling\_Report/gatling-charts-highcharts-bundle-3.0.3  
Error: Could not find or load main class io.gatling.app.Gatling

I have tried with gatling-charts-highcharts-bundle-2.3.1 version too still got the same error

---

<div class="post-metadata">

**Author:** ![slandelle](https://dub1.discourse-cdn.com/flex013/user_avatar/community.gatling.io/slandelle/32/4_2.png) [@slandelle](https://community.gatling.io/u/slandelle)\
**Post date:** [April 2, 2020, 9:25pm UTC](https://community.gatling.io/t/error-could-not-find-or-load-main-class-io-gatling-app-gatling/5570/2 "2020-04-02T21:25:15Z")

</div>

It looks like you’re using a bash emulator on Windows. Try using the bat script on standard Windows CLI instead.

---

<div class="post-metadata">

**Author:** ![Rajesh\_V](https://avatars.discourse-cdn.com/v4/letter/r/839c29/32.png) [@Rajesh\_V](https://community.gatling.io/u/Rajesh_V)\
**Post date:** [April 3, 2020, 7:23am UTC](https://community.gatling.io/t/error-could-not-find-or-load-main-class-io-gatling-app-gatling/5570/3 "2020-04-03T07:23:31Z")

</div>

I tried with bat script getting the below issue.

$ bash /c/Users/Admin/Desktop/Performance/Gatling\_Report/gatling-charts-highcharts-bundle-3.0.3/bin/gatling.bat -ro /Users/Admin/Desktop/Performance/Results/Promise-En  
gine/  
/c/Users/Admin/Desktop/Performance/Gatling\_Report/gatling-charts-highcharts-bundle-3.0.3/bin/gatling.bat: line 1: @ECHO: command not found  
/c/Users/Admin/Desktop/Performance/Gatling\_Report/gatling-charts-highcharts-bundle-3.0.3/bin/gatling.bat: line 2: @REM: command not found  
/c/Users/Admin/Desktop/Performance/Gatling\_Report/gatling-charts-highcharts-bundle-3.0.3/bin/gatling.bat: line 3: syntax error near unexpected token `(' /c/Users/Admin/Desktop/Performance/Gatling_Report/gatling-charts-highcharts-bundle-3.0.3/bin/gatling.bat: line 3: `@REM Copyright 2011-2017 GatlingCorp ([http://gatling.io](http://gatling.io))’

---

<div class="post-metadata">

**Author:** ![slandelle](https://dub1.discourse-cdn.com/flex013/user_avatar/community.gatling.io/slandelle/32/4_2.png) [@slandelle](https://community.gatling.io/u/slandelle)\
**Post date:** [April 3, 2020, 7:30am UTC](https://community.gatling.io/t/error-could-not-find-or-load-main-class-io-gatling-app-gatling/5570/4 "2020-04-03T07:30:02Z")

</div>

You’re not directly running on Windows.  
/c/Users/Admin is definitively not a Windows path.

Run standard Windows cli, not a linux shell emulator.

---

<div class="post-metadata">

**Author:** ![Rajesh\_V](https://avatars.discourse-cdn.com/v4/letter/r/839c29/32.png) [@Rajesh\_V](https://community.gatling.io/u/Rajesh_V)\
**Post date:** [April 8, 2020, 10:56am UTC](https://community.gatling.io/t/error-could-not-find-or-load-main-class-io-gatling-app-gatling/5570/5 "2020-04-08T10:56:32Z")

</div>

Thanks Stephane.

Tried in Windows cli, But got this below error.

Exception in thread “main” java.lang.NumberFormatException: For input string: “sodimacResult”  
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)  
at java.lang.Long.parseLong(Long.java:589)  
at java.lang.Long.parseLong(Long.java:631)  
at scala.collection.immutable.StringLike.toLong(StringLike.scala:309)  
at scala.collection.immutable.StringLike.toLong$(StringLike.scala:309)  
at scala.collection.immutable.StringOps.toLong(StringOps.scala:33)  
at io.gatling.charts.stats.LogFileReader.$anonfun$firstPass$1(LogFileReader.scala:102)  
at scala.collection.Iterator.foreach(Iterator.scala:941)  
at scala.collection.Iterator.foreach$(Iterator.scala:941)  
at scala.collection.Iterator$ConcatIterator.foreach(Iterator.scala:179)  
at io.gatling.charts.stats.LogFileReader.firstPass(LogFileReader.scala:86)  
at io.gatling.charts.stats.LogFileReader.$anonfun$x$4$1(LogFileReader.scala:125)  
at io.gatling.charts.stats.LogFileReader.parseInputFiles(LogFileReader.scala:63)  
at io.gatling.charts.stats.LogFileReader.(LogFileReader.scala:125)  
at io.gatling.app.RunResultProcessor.initLogFileReader(RunResultProcessor.scala:67)  
at io.gatling.app.RunResultProcessor.processRunResult(RunResultProcessor.scala:49)  
at io.gatling.app.Gatling$.start(Gatling.scala:82)  
at io.gatling.app.Gatling$.fromArgs(Gatling.scala:47)  
at io.gatling.app.Gatling$.main(Gatling.scala:39)  
at io.gatling.app.Gatling.main(Gatling.scala)

---

<div class="post-metadata">

**Author:** ![slandelle](https://dub1.discourse-cdn.com/flex013/user_avatar/community.gatling.io/slandelle/32/4_2.png) [@slandelle](https://community.gatling.io/u/slandelle)\
**Post date:** [April 8, 2020, 11:14am UTC](https://community.gatling.io/t/error-could-not-find-or-load-main-class-io-gatling-app-gatling/5570/6 "2020-04-08T11:14:54Z")

</div>

No idea what you’re doing. It looks like your simulation.log file is corrupted/has not the expected format.

---

<div class="post-metadata">

**Author:** ![Mishal\_Alexander](https://avatars.discourse-cdn.com/v4/letter/m/45deac/32.png) [@Mishal\_Alexander](https://community.gatling.io/u/Mishal_Alexander)\
**Post date:** [April 12, 2020, 7:51pm UTC](https://community.gatling.io/t/error-could-not-find-or-load-main-class-io-gatling-app-gatling/5570/7 "2020-04-12T19:51:13Z")

</div>

Hi Rajesh,

I think your IntelliJ setup is not proper. Why don’t you try with VS Code and see if it works?  
[https://www.james-willett.com/gatling-vscode/](https://www.james-willett.com/gatling-vscode/)

Hope this helps.
