You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jmeter.apache.org by fs...@apache.org on 2017/11/05 09:59:49 UTC
svn commit: r1814345 - /jmeter/trunk/bin/jmeter
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
Re: svn commit: r1814345 - /jmeter/trunk/bin/jmeter
Posted by Philippe Mouawad <ph...@gmail.com>.
We have to check for java9 to add command line parameters
On Monday, November 6, 2017, sebb <se...@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.schumacher@internetallee.de <javascript:;>> wrote:
> >
> >
> > Am 5. November 2017 11:26:32 MEZ schrieb Philippe Mouawad <
> philippe.mouawad@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, <fschumacher@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.
Re: svn commit: r1814345 - /jmeter/trunk/bin/jmeter
Posted by Felix Schumacher <fe...@internetallee.de>.
Am 6. November 2017 19:01:42 MEZ schrieb sebb <se...@gmail.com>:
>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
Right, we discussed this earlier. And I would like to drop it, too....
The problem here is, that Java 9 needs a special parameter. :(
Regards,
Felix
>
>
>On 5 November 2017 at 10:56, Felix Schumacher
><fe...@internetallee.de> wrote:
>>
>>
>> Am 5. November 2017 11:26:32 MEZ schrieb Philippe Mouawad
><ph...@gmail.com>:
>>>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, <fs...@apache.org> 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
>>>>
>>>>
>>>>
Re: svn commit: r1814345 - /jmeter/trunk/bin/jmeter
Posted by sebb <se...@gmail.com>.
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
<fe...@internetallee.de> wrote:
>
>
> Am 5. November 2017 11:26:32 MEZ schrieb Philippe Mouawad <ph...@gmail.com>:
>>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, <fs...@apache.org> 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
>>>
>>>
>>>
Re: svn commit: r1814345 - /jmeter/trunk/bin/jmeter
Posted by Felix Schumacher <fe...@internetallee.de>.
Am 5. November 2017 11:26:32 MEZ schrieb Philippe Mouawad <ph...@gmail.com>:
>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, <fs...@apache.org> 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
>>
>>
>>
Re: svn commit: r1814345 - /jmeter/trunk/bin/jmeter
Posted by Philippe Mouawad <ph...@gmail.com>.
Hi Felix,
Are there the same number problems on windows jmeter.bat ?
Thanks
On Sunday, November 5, 2017, <fs...@apache.org> 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.