jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kai Kaisen <>
Subject BSF Sampler - error on executing external app with blanks in path and name
Date Fri, 11 Mar 2011 16:56:23 GMT
Hi guys,
How to use the BSF Sampler with beanshell to execute an external application
which has blanks in its path and name?
I tried something like this:

exec("/Applications/Adobe\ Photoshop\ CS5/Adobe\ Photoshop\\ Photoshop\ CS5");

As you can see I am on a MAC. I know, the problems is caused by the blanks
in the path.I tried different ways to 'mark' them but nothing helped.
JMeter always throws an error:


2011/03/11 17:44:41 WARN  - BSF
error org.apache.bsf.BSFException: BeanShell script error: Sourced file:
inline evaluation of: ``exec("Applications/Adobe\ Photoshop\ CS5/Adobe\
Photoshop\ . . . '' Token Parsing Error: Lexical error
at line 1, column 26.  Encountered: " " (32), after :
"\"Applications/Adobe\\": <at unknown location>

 BSF info: script at line: 0 column: columnNo

at bsh.util.BeanShellBSFEngine.eval(


at org.apache.jmeter.threads.JMeterThread.process_sampler(



2011/03/11 17:44:42 INFO  - jmeter.threads.JMeterThread: Thread finished:
Thread Group 1-1

I also tried:
exec("/Applications/Adobe\\ Photoshop\\ CS5/Adobe\\ Photoshop\\\\ Photoshop\\ CS5");
exec("/Applications/Adobe Photoshop CS5/Adobe Photoshop Photoshop CS5");
exec("'/Applications/Adobe Photoshop CS5/Adobe Photoshop Photoshop CS5'");
Nothing helped.
A workaround is to call a script with a 'clean' name and use this to start
the app but...thats not cool.
Any ideas?
Thank you very much!

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message