error Unrecognized VM option 'OptimizeStringConcat'

When executing then getting following error

Unrecognized VM option ‘OptimizeStringConcat’
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

Any idea?

Which version of the JVM are you using? 32 or 64 bits?


i am using 32 bit jvm.

OptimizeStringConcat was introduced in Java 6u20, so it’s quite old.

You should upgrade to a modern JDK.

i am using gatling 2 running this with jdk1.7.0_51 and jre7 so i guess i am using all latest jdk installation in my machine?

Where I can find step by step installtion instruction for Gatling?

Are you sure you don’t have multiple JRE/JDK installations on your machine and that they’re messed up?
For example, did you set a JAVA_HOME that actually targets an old Java 6? Did you check which version is in your path?

Have you tried editing and remove the option? It may work.

Yes, that would work, but that wouldn’t fix the issue that a wrong JDK is being picked up.
From what I know, OptimizeStringConcat not being recognized can only mean that a java < 6u20 is being picked up.
Gatling uses NIO and this part of the JDK tends to get fixed a lot in modern versions.


Executing java -version from the gatling/bin dir and checking the output of env command would help the OP.

i tried removing the option OptimizeStringConcat from .sh and it worked but i guess that not correct workaround?

We had the issue once:
But we now force server mode in our shell script. Did you remove it?

yes i removed the option option OptimizeStringConcat from .sh from file and it worked.

But you have the -server option, right?

yes - server option is there. one more question if i want to monitor response time summary during my test execution then how i can monitor this via Gatling? currently I can see this summary only after execution. is it possible to monitor these stats during runtime execution?

The console periodically display some information (every 5s), don’t you see it?
You can also try our Graphite integration:

from perf testing point of view any document available which explains about this. for example how to integrate Gatling with Eclipse, Jenkins, Maven Arch and Graphite?



When I am trying to integrate my eclipse with Maven Arch using remote catalog ( then I am getting java.lang.nullpointer exception and also when verifying this URL then getting “Remote catalog is empty” message. Please advice how I can integrate remote maven archetype with my eclipse?

It look like a problem on your side (network?).
What does the url display in your browser?

The procedure is described in the wiki:

I can see following xml in my browser


So the problem is with your IDE/maven support.
Do you have a proxy that might not be set up for your maven support?
Another possibility is that your IDE failed to download the catalog for whatever reason and that it keeps this failure in cache until you restart it.