We have to check for java9 to add command line parameters On Monday, November 6, 2017, sebb <seb...@gmail.com> wrote:
> Why are we still using this fragile check at all? > > For most users the check is just a waste of time. > > Let's drop the check entirely. > > If the Java command exits with a non-zero status, then just print a > message to say what the following error means: > > Exception in thread "main" java.lang.UnsupportedClassVersionError: > org/apache/jmeter/NewDriver : Unsupported major.minor version 52.0 > > > On 5 November 2017 at 10:56, Felix Schumacher > <felix.schumac...@internetallee.de <javascript:;>> wrote: > > > > > > Am 5. November 2017 11:26:32 MEZ schrieb Philippe Mouawad < > philippe.moua...@gmail.com <javascript:;>>: > >>Hi Felix, > >>Are there the same number problems on windows jmeter.bat ? > > > > Having no windows at hand and not being a windows guy, I really don't > know. > > > > Felix > > > >> > >>Thanks > >> > >>On Sunday, November 5, 2017, <fschumac...@apache.org <javascript:;>> > wrote: > >> > >>> Author: fschumacher > >>> Date: Sun Nov 5 09:59:48 2017 > >>> New Revision: 1814345 > >>> > >>> URL: http://svn.apache.org/viewvc?rev=1814345&view=rev > >>> Log: > >>> Use the same binary for version detection as the one we start. > >>> > >>> Bugzilla Id: 61529 > >>> > >>> Modified: > >>> jmeter/trunk/bin/jmeter > >>> > >>> Modified: jmeter/trunk/bin/jmeter > >>> URL: http://svn.apache.org/viewvc/jmeter/trunk/bin/jmeter?rev= > >>> 1814345&r1=1814344&r2=1814345&view=diff > >>> ============================================================ > >>> ================== > >>> --- jmeter/trunk/bin/jmeter (original) > >>> +++ jmeter/trunk/bin/jmeter Sun Nov 5 09:59:48 2017 > >>> @@ -69,9 +69,8 @@ ADD_MODS= > >>> # Minimal version to run JMeter > >>> MINIMAL_VERSION=8 > >>> > >>> -_java=`type java | awk '{ print $ NF }'` > >>> # Check if version is from OpenJDK or Oracle Hotspot JVM prior to 9 > >>> containing 1.${version}.x > >>> -CURRENT_VERSION=`"$_java" -version 2>&1 | awk -F'"' '/version/ > >>> {gsub("^1[.]", "", $2); gsub("[^0-9].*$", "", $2); print $2}'` > >>> +CURRENT_VERSION=`"${JAVA_HOME}/bin/java" -version 2>&1 | awk -F'"' > >>> '/version/ {gsub("^1[.]", "", $2); gsub("[^0-9].*$", "", $2); print > >>$2}'` > >>> > >>> # Check if Java is present and the minimal version requirement > >>> if [ "$CURRENT_VERSION" -gt "$MINIMAL_VERSION" ]; then > >>> > >>> > >>> > -- Cordialement. Philippe Mouawad.