Am 30. Januar 2018 22:16:52 MEZ schrieb Philippe Mouawad <philippe.moua...@gmail.com>: >Hi Felix, >I don't understand the fix . > >AFAIU, calling ./jmeter.sh would trigger a broken shell since it >doesn't >add --add-modules with Java9 for example. > >Can you explain please ?
You are right, the fix is broken. I wanted to restore the old behavior of the shell script, which was to have no arguments added except the user given ones. The Java 9 workaround will have to be added back again. I think I will add it to the JVM_ARGS. Felix > >Thank you > >On Tue, Jan 30, 2018 at 9:54 PM, <fschumac...@apache.org> wrote: > >> Author: fschumacher >> Date: Tue Jan 30 20:54:49 2018 >> New Revision: 1822700 >> >> URL: http://svn.apache.org/viewvc?rev=1822700&view=rev >> Log: >> Rip out most logic from jmeter.sh and make it a simple wrapper for >> jmeter.sh >> >> Modified: >> jmeter/trunk/bin/jmeter >> jmeter/trunk/bin/jmeter.sh >> >> Modified: jmeter/trunk/bin/jmeter >> URL: http://svn.apache.org/viewvc/jmeter/trunk/bin/jmeter?rev= >> 1822700&r1=1822699&r2=1822700&view=diff >> ============================================================ >> ================== >> --- jmeter/trunk/bin/jmeter (original) >> +++ jmeter/trunk/bin/jmeter Tue Jan 30 20:54:49 2018 >> @@ -183,6 +183,10 @@ DUMP="-XX:+HeapDumpOnOutOfMemoryError" >> SYSTEM_PROPS="-Djava.security.egd=file:/dev/urandom" >> SERVER="-server" >> >> -ARGS="$SERVER $DUMP $JMETER_HEAP $VERBOSE_GC $JMETER_GC_ALGO >> $SYSTEM_PROPS $JMETER_LANGUAGE $RUN_IN_DOCKER" >> +if [ -z "${JMETER_COMPLETE_ARGS}" ]; then >> + ARGS="$ADD_MODS $SERVER $DUMP $JMETER_HEAP $VERBOSE_GC >> $JMETER_GC_ALGO $SYSTEM_PROPS $JMETER_LANGUAGE $RUN_IN_DOCKER" >> +else >> + ARGS="" >> +fi >> >> -"$JAVA_HOME/bin/java" $ADD_MODS $ARGS $JVM_ARGS $JMETER_OPTS -jar >> "$PRGDIR/ApacheJMeter.jar" "$@" >> +"$JAVA_HOME/bin/java" $ARGS $JVM_ARGS $JMETER_OPTS -jar >> "$PRGDIR/ApacheJMeter.jar" "$@" >> >> Modified: jmeter/trunk/bin/jmeter.sh >> URL: http://svn.apache.org/viewvc/jmeter/trunk/bin/jmeter.sh? >> rev=1822700&r1=1822699&r2=1822700&view=diff >> ============================================================ >> ================== >> --- jmeter/trunk/bin/jmeter.sh (original) >> +++ jmeter/trunk/bin/jmeter.sh Tue Jan 30 20:54:49 2018 >> @@ -15,6 +15,8 @@ >> ## See the License for the specific language governing permissions >and >> ## limitations under the License. >> >> +## This is a simple wrapper for the script bin/jmeter.sh >> +## >> ## Basic JMeter startup script for Un*x systems >> ## See the "jmeter" script for details of options that can be used >for >> Sun JVMs >> >> @@ -27,24 +29,6 @@ >> ## >> ## ============================================== >> >> -# Minimal version to run JMeter >> -MINIMAL_VERSION=1.8.0 >> - >> -# Check if Java is present and the minimal version requirement >> -_java=`type java | awk '{ print $ NF }'` >> -CURRENT_VERSION=`"$_java" -version 2>&1 | awk -F'"' '/version/ >{print >> $2}'` >> -minimal_version=`echo $MINIMAL_VERSION | awk -F'.' '{ print $2 }'` >> -current_version=`echo $CURRENT_VERSION | awk -F'.' '{ print $2 }'` >> -if [ $current_version ]; then >> - if [ $current_version -lt $minimal_version ]; then >> - echo "Error: Java version is too low to run JMeter. >> Needs at least Java >= ${MINIMAL_VERSION}." >> - exit 1 >> - fi >> - else >> - echo "Not able to find Java executable or version. Please >check >> your Java installation." >> - exit 1 >> -fi >> - >> # resolve links - $0 may be a softlink (code as used by Tomcat) >> # N.B. readlink would be a lot simpler but is not supported on >Solaris >> PRG="$0" >> @@ -61,13 +45,6 @@ done >> >> PRGDIR=`dirname "$PRG"` >> >> -JMETER_OPTS="" >> -case `uname` in >> - Darwin*) >> - # Add Mac-specific property - should be ignored elsewhere (Bug >47064) >> - JMETER_OPTS="-Xdock:name=JMeter -Xdock:icon=\"${PRGDIR}/../ >> docs/images/jmeter_square.png\" -Dapple.laf.useScreenMenuBar=true >> -Dapple.eawt.quitStrategy=CLOSE_ALL_WINDOWS" >> - ;; >> -esac >> - >> +export JMETER_COMPLETE_ARGS=true >> >> -java $JVM_ARGS $JMETER_OPTS -jar "$PRGDIR/ApacheJMeter.jar" "$@" >> +"${PRGDIR}/jmeter" "$@" >> >> >>