automator shell script application doesn't work in 10.13 I created application by automator for running jmeter. Since 10.13, this application does not work any more.

My shell script(I put jmeter directory in application Contents):

RADIR=`ps x | grep jmeter | grep -v grep | cut -c 28- `
COMMAND="$(dirname "$RADIR")/jmeter/bin/jmeter &gt; /dev/null 2&gt;&amp;1 &amp;"
eval $COMMAND


I checked that command is correct. But it doesn't work by running application. And it worked well before 10.12

I got some messages in Console log, The reason seems to be security exception. I am not sure


Some security mechanisms have been changed? How can fix it? 

Thanks
About my previous analysis, I was totally wrong.

I ignore an important thing, Java version, not mac os x version. I just installed jdk 10 additionally and I also have jdk 8 in my system. Of course I set environment variable JAVA_HOME for jdk 8 in .bash_profile and .bashrc files, I checked java version in Terminal, it's java 8, everything is fine.

But in automator running process, java version is 10

Change shell script for getting error message

RADIR=`ps x | grep jmeter | grep -v grep | cut -c 28- `
java -version &gt; ~/log.jmeter 2&gt;&amp;1 &amp;
COMMAND="$(dirname "$RADIR")/jmeter/bin/jmeter &gt;&gt; ~/log.jmeter 2&gt;&amp;1 &amp;"
eval $COMMAND


log.jmeter:


  java version "10.0.1" 2018-04-17 
  
  Java(TM) SE Runtime Environment 18.3
  (build 10.0.1+10) 
  
  Java HotSpot(TM) 64-Bit Server VM 18.3 (build
  10.0.1+10, mixed mode) 
  
  Error: Java version is too low to run JMeter. Needs at least Java >= 1.8.0.


What!!!! That's the problem~~~

Change shell script to fix it:

export JAVA_HOME="$(/usr/libexec/java_home -v 1.8)"
export PATH=$PATH:$JAVA_HOME/bin
RADIR=`ps x | grep jmeter | grep -v grep | cut -c 28- `
COMMAND="$(dirname "$RADIR")/jmeter/bin/jmeter &gt; /dev/null 2&gt;&amp;1 &amp;"
eval $COMMAND


It works well.

So, there are two problems in this issue:


Jmeter is not support jdk 10 (wait for official update)
How to properly set java home environment variable for automator?