title: Build executable JAR for Gatling load test
body: <p>I am new to Gatling (2.1.2) and want to do a small prototype project to show to my colleagues.</p>
  
  <p>According to the <a href="http://gatling.io/docs/2.1.2/quickstart.html" rel="noreferrer">quick start</a> page, there are several ways I can run a simulation with Gatling:</p>
  
  <ol>
  <li>decompress the Gatling bundle into a folder and drop my simulation files into user-files/simulations folder.  bin/gatling.sh will compile and run the simulation files.</li>
  <li>use the <code>gatling-maven-plugin</code> maven plugin to execute the simulation.</li>
  <li>create a project with <code>gatling-highcharts-maven-archetype</code>, and run the Engine class.</li>
  </ol>
  
  <p>and I found those problems</p>
  
  <p>For 1, it is hard to add dependencies for simulation classes.  I have to figure out what the jars are needed and drop them to the lib folder.</p>
  
  <p>For 2, it requires maven to be installed.</p>
  
  <p>For 3, it only runs from an IDE</p>
  
  <p>I just want a simple executable JAR file with all the dependencies bundled together (my simulation, Gatling and third party), and run it from any machine (like EC2 instances).</p>
  
  <p>Is there a way to achieve this?</p>
  
  <p><strong>Update 1:</strong></p>
  
  <p>I tried method 3, but moving all the project files from <code>test</code> folder to <code>main</code>, and used <code>maven-assembly-plugin</code> to build a jar with dependencies.  When I tried to run the file, I got the following error:</p>
  
  <pre><code>Exception in thread "main" java.lang.ExceptionInInitializerError
      at Engine$.delayedEndpoint$Engine$1(Engine.scala:7)
      at Engine$delayedInit$body.apply(Engine.scala:4)
      at scala.Function0$class.apply$mcV$sp(Function0.scala:40)
      at scala.runtime.AbstractFunction0.apply$mcV$sp(AbstractFunction0.scala:12)
      at scala.App$$anonfun$main$1.apply(App.scala:76)
      at scala.App$$anonfun$main$1.apply(App.scala:76)
      at scala.collection.immutable.List.foreach(List.scala:381)
      at scala.collection.generic.TraversableForwarder$class.foreach(TraversableForwarder.scala:35)
      at scala.App$class.main(App.scala:76)
      at Engine$.main(Engine.scala:4)
      at Engine.main(Engine.scala)
  Caused by: java.nio.file.FileSystemNotFoundException
      at com.sun.nio.zipfs.ZipFileSystemProvider.getFileSystem(ZipFileSystemProvider.java:171)
      at com.sun.nio.zipfs.ZipFileSystemProvider.getPath(ZipFileSystemProvider.java:157)
      at java.nio.file.Paths.get(Paths.java:143)
      at io.gatling.core.util.PathHelper$.uri2path(PathHelper.scala:32)
      at IDEPathHelper$.&lt;init&gt;(IDEPathHelper.scala:7)
      at IDEPathHelper$.&lt;clinit&gt;(IDEPathHelper.scala)
      ... 11 more
  </code></pre>
  
  <p>I guess this is something to do with Gatling configuration, but don't know what has gone wrong.</p>