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

Following the documentation, JDK8 has installed on my WIN2012 R2 server machine.
However, i still cannot launch the recorder successfully.

Even gatling.bat also encounter the following error.

GATLING_HOME is set to “D:\iDA_Proj\Tools\gatling-2.2.3”
JAVA = ““C:\Program Files\Java\jdk1.8.0_102\bin\java.exe””
“C:\Program Files\Java\jdk1.8.0_102\bin\java.exe” -server -Xmx1G -XX:+UseG1GC -XX:MaxGCPauseMillis=
30 -XX:G1HeapRegionSize=16m -XX:InitiatingHeapOccupancyPercent=75 -XX:+ParallelRefProcEnabled -XX:+P
erfDisableSharedMem -XX:+AggressiveOpts -XX:+OptimizeStringConcat -XX:+HeapDumpOnOutOfMemoryError -D -cp “D:\iDA_Proj\Tools\gatling-2.
2.3”\lib*;“D:\iDA_Proj\Tools\gatling-2.2.3”\user-files;“D:\iDA_Proj\Tools\gatling-2.2.3”\conf; i
Usage: java [-options] class [args…]
(to execute a class)
or java [-options] -jar jarfile [args…]
(to execute a jar file)
where options include:
-d32 use a 32-bit data model if available
-d64 use a 64-bit data model if available
-server to select the “server” VM
The default VM is server.

Any suggestion?

I really cannot believe that after move the gatling home folder from D:\iDA_Proj\Tools\gatling-2.2.2 to D:\Tools\gatling-2.2.2, issue has been resolved automatically. So weird!!

This happens because Windows has a pretty short limit on commands length.
We currently launch Gatling in a straightforward fashion, like “java -classpath <LIST_ABSOLUTE_PATHS_OF_ALL_JARS_IN_LIB_DIR> Gatling”. The deeper the Gatling path, the longer the classpath.
At some point, we might want to work around this Windows limitation and go with a more complex strategy, like having a booter that would create a classloader in a different fashion, but that will only happen in Gatling 3.
AFAIK, we don’t have the problem with OSX/Linux.

Hi, Please can you help with a solution to this similar issue.

I am runing Gatling on window enterprise 7 cmd and I am getting below error message. Can someone help me please. this is my first time using Gatling.

This is the error: Error: Could not find or load main class

I entered the following script in the command line: C:\Users\akinrins\Desktop\Gatling\bin>gatling -s CEHSimulation

Try reducing path length and moving Gatling install closer to filesystem root.

I am getting same issue - the only change is that I power off my MAC, and now
just run --version . will get “Error: Could not find or load main class”