Running "gatling.bat" throws IOException: Java path name shows two "bin"

While running “gatling.bat” through command prompt, the following error throws. The path to Java shows two bin folders.
Environment variable setting done. Changed the path in command prompt also… Where should the path be changed so as to reflect the correct one?

Exception in thread “main” java.io.IOException: Cannot run program “C:\apps\jdk1.6.0_31\bin\bin\java.exe”: CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessBuilder.start(ProcessBuilder.java:460)
at scala.sys.process.ProcessBuilderImpl$Simple.run(ProcessBuilderImpl.scala:68)
at scala.sys.process.ProcessBuilderImpl$AbstractBuilder.run(ProcessBuild
erImpl.scala:97)
at scala.sys.process.ProcessBuilderImpl$AbstractBuilder.$bang(ProcessBui
lderImpl.scala:111)
at io.gatling.app.ZincCompilerLauncher$.apply(ZincCompilerLauncher.scala
:43)
at io.gatling.app.SimulationClassLoader$.fromSourcesDirectory(Simulation
ClassLoader.scala:32)
at io.gatling.app.Gatling$$anonfun$15$$anonfun$17.apply(Gatling.scala:18
5)
at io.gatling.app.Gatling$$anonfun$15$$anonfun$17.apply(Gatling.scala:18
5)
at scala.Option.getOrElse(Option.scala:120)
at io.gatling.app.Gatling$$anonfun$15.apply(Gatling.scala:185)
at io.gatling.app.Gatling$$anonfun$15.apply(Gatling.scala:177)
at scala.Option.getOrElse(Option.scala:120)
at io.gatling.app.Gatling.start(Gatling.scala:176)
at io.gatling.app.Gatling$.fromMap(Gatling.scala:54)
at io.gatling.app.Gatling$.runGatling(Gatling.scala:79)
at io.gatling.app.Gatling$.runGatling(Gatling.scala:58)
at io.gatling.app.Gatling$.main(Gatling.scala:49)
at io.gatling.app.Gatling.main(Gatling.scala)
Caused by: java.io.IOException: CreateProcess error=2, The system cannot find th
e file specified
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.(ProcessImpl.java:81)
at java.lang.ProcessImpl.start(ProcessImpl.java:30)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:453)
… 17 more

Are you sure that you haven’t set your JAVA_HOME to “C:\apps\jdk1.6.0_31\bin” instead of “C:\apps\jdk1.6.0_31”?

Then, note that Gatling 2 release candidates require JDK7u6+ and won’t work with your JDK6.

Hi,

Your JAVA_HOME environnement variable must not point to the bin folder, only to the “root” of your JDK, e.g C:\apps\jdk1.6.0_31.
Then your PATH variable include %JAVA_HOME%\bin.
Note that it is not Gatling specific, every tool relying on the JAVA_HOME environnement variables expect this.

Is JDK7 required for gatling-charts-highcharts-2.0.0-SNAPSHOT?

Yep, see doc

http://gatling.io/docs/2.0.0-RC4/quickstart.html#installing

http://gatling.io/docs/2.0.0-RC4/project/migration_guides/2.0.0-M3a-to-2.0.0-RC3.html#gatling-requires-at-least-jdk7u6