New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
jmeter.bat fails to execute due to space in the (program files) for jdk path #4694
Comments
@FSchumacher (migrated from Bugzilla): Would you be able to verify, that it solves your problem? Date: Thu Feb 15 19:25:26 2018 URL: http://svn.apache.org/viewvc?rev=1824348&view=rev Modified: |
Manu (migrated from Bugzilla): |
Manu (migrated from Bugzilla): c:\apache-jmeter-3.2\bin>rem Licensed to the Apache Software Foundation (ASF) under one or more c:\apache-jmeter-3.2\bin>rem contributor license agreements. See the NOTICE file distributed with c:\apache-jmeter-3.2\bin>rem this work for additional information regarding copyright ownership. c:\apache-jmeter-3.2\bin>rem The ASF licenses this file to You under the Apache License, Version 2.0 c:\apache-jmeter-3.2\bin>rem (the "License"); you may not use this file except in compliance with c:\apache-jmeter-3.2\bin>rem the License. You may obtain a copy of the License at c:\apache-jmeter-3.2\bin>rem c:\apache-jmeter-3.2\bin>rem http://www.apache.org/licenses/LICENSE-2.0 c:\apache-jmeter-3.2\bin>rem c:\apache-jmeter-3.2\bin>rem Unless required by applicable law or agreed to in writing, software c:\apache-jmeter-3.2\bin>rem distributed under the License is distributed on an "AS IS" BASIS, c:\apache-jmeter-3.2\bin>rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. c:\apache-jmeter-3.2\bin>rem See the License for the specific language governing permissions and c:\apache-jmeter-3.2\bin>rem limitations under the License. c:\apache-jmeter-3.2\bin>rem ===================================================== c:\apache-jmeter-3.2\bin>rem Environment variables that can be defined externally: c:\apache-jmeter-3.2\bin>rem c:\apache-jmeter-3.2\bin>rem Do not set the variables in this script. Instead put them into a script c:\apache-jmeter-3.2\bin>rem setenv.bat in JMETER_HOME/bin to keep your customizations separate. c:\apache-jmeter-3.2\bin>rem c:\apache-jmeter-3.2\bin>rem DDRAW - (Optional) JVM options to influence usage of direct draw, c:\apache-jmeter-3.2\bin>rem e.g. '-Dsun.java2d.ddscale=true' c:\apache-jmeter-3.2\bin>rem c:\apache-jmeter-3.2\bin>rem JMETER_BIN - JMeter bin directory (must end in ) c:\apache-jmeter-3.2\bin>rem c:\apache-jmeter-3.2\bin>rem JMETER_COMPLETE_ARGS - if set indicates that JVM_ARGS is to be used exclusively instead c:\apache-jmeter-3.2\bin>rem of adding other options like HEAP or GC_ALGO c:\apache-jmeter-3.2\bin>rem c:\apache-jmeter-3.2\bin>rem JMETER_HOME - installation directory. Will be guessed from location of jmeter.bat c:\apache-jmeter-3.2\bin>rem c:\apache-jmeter-3.2\bin>rem JM_LAUNCH - java.exe (default) or javaw.exe c:\apache-jmeter-3.2\bin>rem c:\apache-jmeter-3.2\bin>rem JM_START - set this to "start" to launch JMeter in a separate window c:\apache-jmeter-3.2\bin>rem this is used by the jmeterw.cmd script. c:\apache-jmeter-3.2\bin>rem c:\apache-jmeter-3.2\bin>rem JVM_ARGS - (Optional) Java options used when starting JMeter, e.g. -Dprop=val c:\apache-jmeter-3.2\bin>rem Defaults to '-Duser.language="en" -Duser.region="EN"' c:\apache-jmeter-3.2\bin>rem c:\apache-jmeter-3.2\bin>rem GC_ALGO - (Optional) JVM garbage collector options c:\apache-jmeter-3.2\bin>rem Defaults to '-XX:+UseG1GC -XX:MaxGCPauseMillis=100 -XX:G1ReservePercent=20' c:\apache-jmeter-3.2\bin>rem c:\apache-jmeter-3.2\bin>rem HEAP - (Optional) JVM memory settings used when starting JMeter c:\apache-jmeter-3.2\bin>rem Defaults to '-Xms1g -Xmx1g -XX:MaxMetaspaceSize=256m' c:\apache-jmeter-3.2\bin>rem c:\apache-jmeter-3.2\bin>rem ===================================================== c:\apache-jmeter-3.2\bin>setlocal c:\apache-jmeter-3.2\bin>rem Guess JMETER_HOME if not defined c:\apache-jmeter-3.2\bin>set "CURRENT_DIR=c:\apache-jmeter-3.2\bin" c:\apache-jmeter-3.2\bin>if not "" == "" goto gotHome c:\apache-jmeter-3.2\bin>set "JMETER_HOME=c:\apache-jmeter-3.2\bin" c:\apache-jmeter-3.2\bin>if exist "c:\apache-jmeter-3.2\bin\bin\jmeter.bat" goto okHome c:\apache-jmeter-3.2\bin>cd .. c:\apache-jmeter-3.2>set "JMETER_HOME=c:\apache-jmeter-3.2" c:\apache-jmeter-3.2>cd "c:\apache-jmeter-3.2\bin" c:\apache-jmeter-3.2\bin>if exist "c:\apache-jmeter-3.2\bin\jmeter.bat" goto okHome c:\apache-jmeter-3.2\bin>rem Get standard environment variables c:\apache-jmeter-3.2\bin>if exist "c:\apache-jmeter-3.2\bin\setenv.bat" call "c:\apache-jmeter-3.2\bin\setenv.bat" c:\apache-jmeter-3.2\bin>if not defined JMETER_LANGUAGE ( c:\apache-jmeter-3.2\bin>rem Minimal version to run JMeter c:\apache-jmeter-3.2\bin>set MINIMAL_VERSION=1.8.0 c:\apache-jmeter-3.2\bin>rem --add-modules java.activation if JAVA 9 c:\apache-jmeter-3.2\bin>set JAVA9_OPTS= c:\apache-jmeter-3.2\bin>for /F "tokens=3" %g in ('java -version 2>&1 | findstr /i "version"') do ( c:\apache-jmeter-3.2\bin>( c:\apache-jmeter-3.2\bin>if not defined JAVAVER ( set ERRORLEVEL=2 c:\apache-jmeter-3.2\bin>rem Check if version is from OpenJDK or Oracle Hotspot JVM prior to 9 containing 1.${version}.x c:\apache-jmeter-3.2\bin>rem JAVAVER will be equal to "9.0.4" (quotes are part of the value) for Oracle Java 9 c:\apache-jmeter-3.2\bin>rem JAVAVER will be equal to "1.8.0_161" (quotes are part of the value) for Oracle Java 8 c:\apache-jmeter-3.2\bin>rem so we extract 2 chars starting from index 1 c:\apache-jmeter-3.2\bin>IF "1." == "1." ( c:\apache-jmeter-3.2\bin>(set current_minor=8 ) c:\apache-jmeter-3.2\bin>for /F "delims=. tokens=1-3" %v in ("1.8.0") do (set minimal_minor=%w ) c:\apache-jmeter-3.2\bin>(set minimal_minor=8 ) c:\apache-jmeter-3.2\bin>if not defined current_minor ( set ERRORLEVEL=2 c:\apache-jmeter-3.2\bin>rem @echo Debug: CURRENT=8 - MINIMAL=8 c:\apache-jmeter-3.2\bin>if 8 LSS 8 ( set ERRORLEVEL=3 c:\apache-jmeter-3.2\bin>if not defined JM_LAUNCH (set JM_LAUNCH=java.exe ) c:\apache-jmeter-3.2\bin>if exist jmeter.bat goto winNT1 c:\apache-jmeter-3.2\bin>rem On NT/2K grab all arguments at once c:\apache-jmeter-3.2\bin>set JMETER_CMD_LINE_ARGS= c:\apache-jmeter-3.2\bin>rem The following link describes the -XX options: c:\apache-jmeter-3.2\bin>rem http://docs.oracle.com/javase/8/docs/technotes/tools/unix/java.html c:\apache-jmeter-3.2\bin>if not defined HEAP ( c:\apache-jmeter-3.2\bin>rem Uncomment this to generate GC verbose file with Java prior to 9 c:\apache-jmeter-3.2\bin>rem set VERBOSE_GC=-verbose:gc -Xloggc:gc_jmeter_%p.log -XX:+PrintGCDetails -XX:+PrintGCCause -XX:+PrintTenuringDistribution -XX:+PrintHeapAtGC -XX:+PrintGCApplicationConcurrentTime -XX:+PrintGCApplicationStoppedTime -XX:+PrintGCDateStamps -XX:+PrintAdaptiveSizePolicy c:\apache-jmeter-3.2\bin>rem Uncomment this to generate GC verbose file with Java 9 and above c:\apache-jmeter-3.2\bin>rem set VERBOSE_GC=-Xlog:gc*,gc+age=trace,gc+heap=debug:file=gc_jmeter_%p.log c:\apache-jmeter-3.2\bin>rem You may want to add those settings c:\apache-jmeter-3.2\bin>rem -XX:+ParallelRefProcEnabled -XX:+PerfDisableSharedMem c:\apache-jmeter-3.2\bin>if not defined GC_ALGO (set GC_ALGO=-XX:+UseG1GC -XX:MaxGCPauseMillis=100 -XX:G1ReservePercent=20 ) c:\apache-jmeter-3.2\bin>set SYSTEM_PROPS=-Djava.security.egd=file:/dev/urandom c:\apache-jmeter-3.2\bin>rem Always dump on OOM (does not cost anything unless triggered) c:\apache-jmeter-3.2\bin>set DUMP=-XX:+HeapDumpOnOutOfMemoryError c:\apache-jmeter-3.2\bin>rem Uncomment this if you run JMeter in DOCKER (need Java SE 8u131 or JDK 9) c:\apache-jmeter-3.2\bin>rem see https://blogs.oracle.com/java-platform-group/java-se-support-for-docker-cpu-and-memory-limits c:\apache-jmeter-3.2\bin>rem set RUN_IN_DOCKER=-XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap c:\apache-jmeter-3.2\bin>rem Additional settings that might help improve GUI performance on some platforms c:\apache-jmeter-3.2\bin>rem See: http://www.oracle.com/technetwork/java/perf-graphics-135933.html c:\apache-jmeter-3.2\bin>if not defined DDRAW ( c:\apache-jmeter-3.2\bin>rem Collect the settings defined above c:\apache-jmeter-3.2\bin>if not defined JMETER_COMPLETE_ARGS (set ARGS= -XX:+HeapDumpOnOutOfMemoryError -Xms1g -Xmx1g -XX:MaxMetaspaceSize=256m -XX:+UseG1GC -XX:MaxGCPauseMillis=100 -XX:G1ReservePercent=20 -Djava.security.egd=file:/dev/urandom -Duser.language="en" -Duser.region="EN" ) else (set ARGS= ) c:\apache-jmeter-3.2\bin>C:\Program Files\Java\jdk1.8.0_162\bin\ -XX:+HeapDumpOnOutOfMemoryError -Xms1g -Xmx1g -XX:MaxMetaspaceSize=256m -XX:+UseG1GC -XX:MaxGCPauseMillis=100 -XX:G1ReservePercent=20 -Djava.security.egd=file:/dev/urandom -Duser.language="en" -Duser.region="EN" -jar "C:\apache-jmeter-3.2\bin\ApacheJMeter.jar" c:\apache-jmeter-3.2\bin>rem If the errorlevel is not zero, then display it and pause c:\apache-jmeter-3.2\bin>if NOT errorlevel 0 goto pause c:\apache-jmeter-3.2\bin>if errorlevel 1 goto pause c:\apache-jmeter-3.2\bin>echo errorlevel=9009 c:\apache-jmeter-3.2\bin>pause |
@FSchumacher (migrated from Bugzilla): Date: Sat Feb 17 13:34:28 2018 URL: http://svn.apache.org/viewvc?rev=1824588&view=rev Hopefully this fill fix the space problem. Modified: |
Manu (migrated from Bugzilla): c:\apache-jmeter-3.2\bin>jmeter ############### c:\apache-jmeter-3.2\bin>rem Licensed to the Apache Software Foundation (ASF) under one or more c:\apache-jmeter-3.2\bin>rem contributor license agreements. See the NOTICE file distributed with c:\apache-jmeter-3.2\bin>rem this work for additional information regarding copyright ownership. c:\apache-jmeter-3.2\bin>rem The ASF licenses this file to You under the Apache License, Version 2.0 c:\apache-jmeter-3.2\bin>rem (the "License"); you may not use this file except in compliance with c:\apache-jmeter-3.2\bin>rem the License. You may obtain a copy of the License at c:\apache-jmeter-3.2\bin>rem c:\apache-jmeter-3.2\bin>rem http://www.apache.org/licenses/LICENSE-2.0 c:\apache-jmeter-3.2\bin>rem c:\apache-jmeter-3.2\bin>rem Unless required by applicable law or agreed to in writing, software c:\apache-jmeter-3.2\bin>rem distributed under the License is distributed on an "AS IS" BASIS, c:\apache-jmeter-3.2\bin>rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. c:\apache-jmeter-3.2\bin>rem See the License for the specific language governing permissions and c:\apache-jmeter-3.2\bin>rem limitations under the License. c:\apache-jmeter-3.2\bin>rem ===================================================== c:\apache-jmeter-3.2\bin>rem Environment variables that can be defined externally: c:\apache-jmeter-3.2\bin>rem c:\apache-jmeter-3.2\bin>rem Do not set the variables in this script. Instead put them into a script c:\apache-jmeter-3.2\bin>rem setenv.bat in JMETER_HOME/bin to keep your customizations separate. c:\apache-jmeter-3.2\bin>rem c:\apache-jmeter-3.2\bin>rem DDRAW - (Optional) JVM options to influence usage of direct draw, c:\apache-jmeter-3.2\bin>rem e.g. '-Dsun.java2d.ddscale=true' c:\apache-jmeter-3.2\bin>rem c:\apache-jmeter-3.2\bin>rem JMETER_BIN - JMeter bin directory (must end in ) c:\apache-jmeter-3.2\bin>rem c:\apache-jmeter-3.2\bin>rem JMETER_COMPLETE_ARGS - if set indicates that JVM_ARGS is to be used exclusively instead c:\apache-jmeter-3.2\bin>rem of adding other options like HEAP or GC_ALGO c:\apache-jmeter-3.2\bin>rem c:\apache-jmeter-3.2\bin>rem JMETER_HOME - installation directory. Will be guessed from location of jmeter.bat c:\apache-jmeter-3.2\bin>rem c:\apache-jmeter-3.2\bin>rem JM_LAUNCH - java.exe (default) or javaw.exe c:\apache-jmeter-3.2\bin>rem c:\apache-jmeter-3.2\bin>rem JM_START - set this to "start" to launch JMeter in a separate window c:\apache-jmeter-3.2\bin>rem this is used by the jmeterw.cmd script. c:\apache-jmeter-3.2\bin>rem c:\apache-jmeter-3.2\bin>rem JVM_ARGS - (Optional) Java options used when starting JMeter, e.g. -Dprop=val c:\apache-jmeter-3.2\bin>rem Defaults to '-Duser.language="en" -Duser.region="EN"' c:\apache-jmeter-3.2\bin>rem c:\apache-jmeter-3.2\bin>rem GC_ALGO - (Optional) JVM garbage collector options c:\apache-jmeter-3.2\bin>rem Defaults to '-XX:+UseG1GC -XX:MaxGCPauseMillis=100 -XX:G1ReservePercent=20' c:\apache-jmeter-3.2\bin>rem c:\apache-jmeter-3.2\bin>rem HEAP - (Optional) JVM memory settings used when starting JMeter c:\apache-jmeter-3.2\bin>rem Defaults to '-Xms1g -Xmx1g -XX:MaxMetaspaceSize=256m' c:\apache-jmeter-3.2\bin>rem c:\apache-jmeter-3.2\bin>rem ===================================================== c:\apache-jmeter-3.2\bin>setlocal c:\apache-jmeter-3.2\bin>rem Guess JMETER_HOME if not defined c:\apache-jmeter-3.2\bin>set "CURRENT_DIR=c:\apache-jmeter-3.2\bin" c:\apache-jmeter-3.2\bin>if not "" == "" goto gotHome c:\apache-jmeter-3.2\bin>set "JMETER_HOME=c:\apache-jmeter-3.2\bin" c:\apache-jmeter-3.2\bin>if exist "c:\apache-jmeter-3.2\bin\bin\jmeter.bat" goto okHome c:\apache-jmeter-3.2\bin>cd .. c:\apache-jmeter-3.2>set "JMETER_HOME=c:\apache-jmeter-3.2" c:\apache-jmeter-3.2>cd "c:\apache-jmeter-3.2\bin" c:\apache-jmeter-3.2\bin>if exist "c:\apache-jmeter-3.2\bin\jmeter.bat" goto okHome c:\apache-jmeter-3.2\bin>rem Get standard environment variables c:\apache-jmeter-3.2\bin>if exist "c:\apache-jmeter-3.2\bin\setenv.bat" call "c:\apache-jmeter-3.2\bin\setenv.bat" c:\apache-jmeter-3.2\bin>if not defined JMETER_LANGUAGE ( c:\apache-jmeter-3.2\bin>rem Minimal version to run JMeter c:\apache-jmeter-3.2\bin>set MINIMAL_VERSION=1.8.0 c:\apache-jmeter-3.2\bin>rem --add-modules java.activation if JAVA 9 c:\apache-jmeter-3.2\bin>set JAVA9_OPTS= c:\apache-jmeter-3.2\bin>for /F "tokens=3" %g in ('java -version 2>&1 | findstr /i "version"') do ( c:\apache-jmeter-3.2\bin>( c:\apache-jmeter-3.2\bin>if not defined JAVAVER ( set ERRORLEVEL=2 c:\apache-jmeter-3.2\bin>rem Check if version is from OpenJDK or Oracle Hotspot JVM prior to 9 containing 1.${version}.x c:\apache-jmeter-3.2\bin>rem JAVAVER will be equal to "9.0.4" (quotes are part of the value) for Oracle Java 9 c:\apache-jmeter-3.2\bin>rem JAVAVER will be equal to "1.8.0_161" (quotes are part of the value) for Oracle Java 8 c:\apache-jmeter-3.2\bin>rem so we extract 2 chars starting from index 1 c:\apache-jmeter-3.2\bin>IF "1." == "1." ( c:\apache-jmeter-3.2\bin>(set current_minor=8 ) c:\apache-jmeter-3.2\bin>for /F "delims=. tokens=1-3" %v in ("1.8.0") do (set minimal_minor=%w ) c:\apache-jmeter-3.2\bin>(set minimal_minor=8 ) c:\apache-jmeter-3.2\bin>if not defined current_minor ( set ERRORLEVEL=2 c:\apache-jmeter-3.2\bin>rem @echo Debug: CURRENT=8 - MINIMAL=8 c:\apache-jmeter-3.2\bin>if 8 LSS 8 ( set ERRORLEVEL=3 c:\apache-jmeter-3.2\bin>if not defined JM_LAUNCH (set JM_LAUNCH=java.exe ) c:\apache-jmeter-3.2\bin>if exist jmeter.bat goto winNT1 c:\apache-jmeter-3.2\bin>rem On NT/2K grab all arguments at once c:\apache-jmeter-3.2\bin>set JMETER_CMD_LINE_ARGS= c:\apache-jmeter-3.2\bin>rem The following link describes the -XX options: c:\apache-jmeter-3.2\bin>rem http://docs.oracle.com/javase/8/docs/technotes/tools/unix/java.html c:\apache-jmeter-3.2\bin>if not defined HEAP ( c:\apache-jmeter-3.2\bin>rem Uncomment this to generate GC verbose file with Java prior to 9 c:\apache-jmeter-3.2\bin>rem set VERBOSE_GC=-verbose:gc -Xloggc:gc_jmeter_%p.log -XX:+PrintGCDetails -XX:+PrintGCCause -XX:+PrintTenuringDistribution -XX:+PrintHeapAtGC -XX:+PrintGCApplicationConcurrentTime -XX:+PrintGCApplicationStoppedTime -XX:+PrintGCDateStamps -XX:+PrintAdaptiveSizePolicy c:\apache-jmeter-3.2\bin>rem Uncomment this to generate GC verbose file with Java 9 and above c:\apache-jmeter-3.2\bin>rem set VERBOSE_GC=-Xlog:gc*,gc+age=trace,gc+heap=debug:file=gc_jmeter_%p.log c:\apache-jmeter-3.2\bin>rem You may want to add those settings c:\apache-jmeter-3.2\bin>rem -XX:+ParallelRefProcEnabled -XX:+PerfDisableSharedMem c:\apache-jmeter-3.2\bin>if not defined GC_ALGO (set GC_ALGO=-XX:+UseG1GC -XX:MaxGCPauseMillis=100 -XX:G1ReservePercent=20 ) c:\apache-jmeter-3.2\bin>set SYSTEM_PROPS=-Djava.security.egd=file:/dev/urandom c:\apache-jmeter-3.2\bin>rem Always dump on OOM (does not cost anything unless triggered) c:\apache-jmeter-3.2\bin>set DUMP=-XX:+HeapDumpOnOutOfMemoryError c:\apache-jmeter-3.2\bin>rem Uncomment this if you run JMeter in DOCKER (need Java SE 8u131 or JDK 9) c:\apache-jmeter-3.2\bin>rem see https://blogs.oracle.com/java-platform-group/java-se-support-for-docker-cpu-and-memory-limits c:\apache-jmeter-3.2\bin>rem set RUN_IN_DOCKER=-XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap c:\apache-jmeter-3.2\bin>rem Additional settings that might help improve GUI performance on some platforms c:\apache-jmeter-3.2\bin>rem See: http://www.oracle.com/technetwork/java/perf-graphics-135933.html c:\apache-jmeter-3.2\bin>if not defined DDRAW ( c:\apache-jmeter-3.2\bin>rem Collect the settings defined above c:\apache-jmeter-3.2\bin>if not defined JMETER_COMPLETE_ARGS (set ARGS= -XX:+HeapDumpOnOutOfMemoryError -Xms1g -Xmx1g -XX:MaxMetaspaceSize=256m -XX:+UseG1GC -XX:MaxGCPauseMillis=100 -XX:G1ReservePercent=20 -Djava.security.egd=file:/dev/urandom -Duser.language="en" -Duser.region="EN" ) else (set ARGS= ) c:\apache-jmeter-3.2\bin>if defined JM_START (set "_JM_START= C:\Program Files\Java\jdk1.8.0_162\bin" ) else (set "_JM_START=C:\Program Files\Java\jdk1.8.0_162\bin" ) c:\apache-jmeter-3.2\bin>C:\Program Files\Java\jdk1.8.0_162\bin\ -XX:+HeapDumpOnOutOfMemoryError -Xms1g -Xmx1g -XX:MaxMetaspaceSize=256m -XX:+UseG1GC -XX:MaxGCPauseMillis=100 -XX:G1ReservePercent=20 -Djava.security.egd=file:/dev/urandom -Duser.language="en" -Duser.region="EN" -jar "C:\apache-jmeter-3.2\bin\ApacheJMeter.jar" c:\apache-jmeter-3.2\bin>rem If the errorlevel is not zero, then display it and pause c:\apache-jmeter-3.2\bin>if NOT errorlevel 0 goto pause c:\apache-jmeter-3.2\bin>if errorlevel 1 goto pause c:\apache-jmeter-3.2\bin>echo errorlevel=9009 c:\apache-jmeter-3.2\bin>pause |
Manu (migrated from Bugzilla):
I took the corresponding bat from trunk and tried but it failed. |
Antonio Gomes Rodrigues (migrated from Bugzilla): Have you try with release 4.0 of JMeter? In my Windows machine (Windows 10), I have no problem Antonio |
@FSchumacher (migrated from Bugzilla): |
@FSchumacher (migrated from Bugzilla):
Date: Mon Feb 19 18:13:45 2018 URL: http://svn.apache.org/viewvc?rev=1824800&view=rev Hopefully this will fix the space problem. Modified: |
Manu (migrated from Bugzilla):
In the Environment variables >> user/system variables. JM_LAUNCH = C:\Program Files\Java\jdk1.8.0_162\bin\ |
Manu (migrated from Bugzilla):
I tried that, hardcording JM_LAUNCH="C:\Program Files\Java\jdk1.8.0_162\bin\java" within jmeter.bat and it worked. However I believe it should work as part of the environment variable settings as well. |
Manu (migrated from Bugzilla):
Actually first I tried with 4.0 version. Then I moved to 3.2. Did you hardcode the JM_LAUNCH path within jmeter.bat? |
@FSchumacher (migrated from Bugzilla):
Instead of editing jmeter.bat you could create a setenv.bat and place it there. Note that I used 'set "var=value"' Have you tried again with the current version? Does the current version work with the environment variable? |
Manu (migrated from Bugzilla):
Yes setting the JM_LAUNCH with setenv.bat as well its working.. C:\apache-jmeter-4.0\bin>jmeter C:\apache-jmeter-4.0\bin>rem Licensed to the Apache Software Foundation (ASF) under one or more C:\apache-jmeter-4.0\bin>rem contributor license agreements. See the NOTICE file distributed with C:\apache-jmeter-4.0\bin>rem this work for additional information regarding copyright ownership. C:\apache-jmeter-4.0\bin>rem The ASF licenses this file to You under the Apache License, Version 2.0 C:\apache-jmeter-4.0\bin>rem (the "License"); you may not use this file except in compliance with C:\apache-jmeter-4.0\bin>rem the License. You may obtain a copy of the License at C:\apache-jmeter-4.0\bin>rem C:\apache-jmeter-4.0\bin>rem http://www.apache.org/licenses/LICENSE-2.0 C:\apache-jmeter-4.0\bin>rem C:\apache-jmeter-4.0\bin>rem Unless required by applicable law or agreed to in writing, software C:\apache-jmeter-4.0\bin>rem distributed under the License is distributed on an "AS IS" BASIS, C:\apache-jmeter-4.0\bin>rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. C:\apache-jmeter-4.0\bin>rem See the License for the specific language governing permissions and C:\apache-jmeter-4.0\bin>rem limitations under the License. C:\apache-jmeter-4.0\bin>rem ===================================================== C:\apache-jmeter-4.0\bin>rem Environment variables that can be defined externally: C:\apache-jmeter-4.0\bin>rem C:\apache-jmeter-4.0\bin>rem Do not set the variables in this script. Instead put them into a script C:\apache-jmeter-4.0\bin>rem setenv.bat in JMETER_HOME/bin to keep your customizations separate. C:\apache-jmeter-4.0\bin>rem C:\apache-jmeter-4.0\bin>rem DDRAW - (Optional) JVM options to influence usage of direct draw, C:\apache-jmeter-4.0\bin>rem e.g. '-Dsun.java2d.ddscale=true' C:\apache-jmeter-4.0\bin>rem C:\apache-jmeter-4.0\bin>rem JMETER_BIN - JMeter bin directory (must end in ) C:\apache-jmeter-4.0\bin>rem C:\apache-jmeter-4.0\bin>rem JMETER_COMPLETE_ARGS - if set indicates that JVM_ARGS is to be used exclusively instead C:\apache-jmeter-4.0\bin>rem of adding other options like HEAP or GC_ALGO C:\apache-jmeter-4.0\bin>rem C:\apache-jmeter-4.0\bin>rem JMETER_HOME - installation directory. Will be guessed from location of jmeter.bat C:\apache-jmeter-4.0\bin>rem C:\apache-jmeter-4.0\bin>rem JM_LAUNCH - java.exe (default) or javaw.exe C:\apache-jmeter-4.0\bin>rem C:\apache-jmeter-4.0\bin>rem JM_START - set this to "start" to launch JMeter in a separate window C:\apache-jmeter-4.0\bin>rem this is used by the jmeterw.cmd script. C:\apache-jmeter-4.0\bin>rem C:\apache-jmeter-4.0\bin>rem JVM_ARGS - (Optional) Java options used when starting JMeter, e.g. -Dprop=val C:\apache-jmeter-4.0\bin>rem Defaults to '-Duser.language="en" -Duser.region="EN"' C:\apache-jmeter-4.0\bin>rem C:\apache-jmeter-4.0\bin>rem GC_ALGO - (Optional) JVM garbage collector options C:\apache-jmeter-4.0\bin>rem Defaults to '-XX:+UseG1GC -XX:MaxGCPauseMillis=100 -XX:G1ReservePercent=20' C:\apache-jmeter-4.0\bin>rem C:\apache-jmeter-4.0\bin>rem HEAP - (Optional) JVM memory settings used when starting JMeter C:\apache-jmeter-4.0\bin>rem Defaults to '-Xms1g -Xmx1g -XX:MaxMetaspaceSize=256m' C:\apache-jmeter-4.0\bin>rem C:\apache-jmeter-4.0\bin>rem ===================================================== C:\apache-jmeter-4.0\bin>setlocal C:\apache-jmeter-4.0\bin>rem Guess JMETER_HOME if not defined C:\apache-jmeter-4.0\bin>set "CURRENT_DIR=C:\apache-jmeter-4.0\bin" C:\apache-jmeter-4.0\bin>if not "" == "" goto gotHome C:\apache-jmeter-4.0\bin>set "JMETER_HOME=C:\apache-jmeter-4.0\bin" C:\apache-jmeter-4.0\bin>if exist "C:\apache-jmeter-4.0\bin\bin\jmeter.bat" goto okHome C:\apache-jmeter-4.0\bin>cd .. C:\apache-jmeter-4.0>set "JMETER_HOME=C:\apache-jmeter-4.0" C:\apache-jmeter-4.0>cd "C:\apache-jmeter-4.0\bin" C:\apache-jmeter-4.0\bin>if exist "C:\apache-jmeter-4.0\bin\jmeter.bat" goto okHome C:\apache-jmeter-4.0\bin>rem Get standard environment variables C:\apache-jmeter-4.0\bin>if exist "C:\apache-jmeter-4.0\bin\setenv.bat" call "C:\apache-jmeter-4.0\bin\setenv.bat" C:\apache-jmeter-4.0\bin>if not defined JMETER_LANGUAGE ( C:\apache-jmeter-4.0\bin>rem Minimal version to run JMeter C:\apache-jmeter-4.0\bin>set MINIMAL_VERSION=1.8.0 C:\apache-jmeter-4.0\bin>rem --add-modules java.activation if JAVA 9 C:\apache-jmeter-4.0\bin>set JAVA9_OPTS= C:\apache-jmeter-4.0\bin>for /F "tokens=3" %g in ('java -version 2>&1 | findstr /i "version"') do ( C:\apache-jmeter-4.0\bin>( C:\apache-jmeter-4.0\bin>if not defined JAVAVER ( set ERRORLEVEL=2 C:\apache-jmeter-4.0\bin>rem Check if version is from OpenJDK or Oracle Hotspot JVM prior to 9 containing 1.${version}.x C:\apache-jmeter-4.0\bin>rem JAVAVER will be equal to "9.0.4" (quotes are part of the value) for Oracle Java 9 C:\apache-jmeter-4.0\bin>rem JAVAVER will be equal to "1.8.0_161" (quotes are part of the value) for Oracle Java 8 C:\apache-jmeter-4.0\bin>rem so we extract 2 chars starting from index 1 C:\apache-jmeter-4.0\bin>IF "1." == "1." ( C:\apache-jmeter-4.0\bin>(set current_minor=8 ) C:\apache-jmeter-4.0\bin>for /F "delims=. tokens=1-3" %v in ("1.8.0") do (set minimal_minor=%w ) C:\apache-jmeter-4.0\bin>(set minimal_minor=8 ) C:\apache-jmeter-4.0\bin>if not defined current_minor ( set ERRORLEVEL=2 C:\apache-jmeter-4.0\bin>rem @echo Debug: CURRENT=8 - MINIMAL=8 C:\apache-jmeter-4.0\bin>if 8 LSS 8 ( set ERRORLEVEL=3 |
@FSchumacher (migrated from Bugzilla): |
Manu (migrated from Bugzilla):
When I use environment variable with setenv.bat it's working. I tested the jmeter.bat from http://svn.apache.org/viewvc/jmeter/branches/docs-4.0/bin/jmeter.bat?view=log |
@FSchumacher (migrated from Bugzilla): |
Manu (migrated from Bugzilla):
I was testing with your fixes available in trunk and updating here. I just retested again. With windows environment variable settings for JM_LAUNCH it's not working. It's working only if I set it in setenv.bat C:\apache-jmeter-4.0\bin>jmeter C:\apache-jmeter-4.0\bin>rem Licensed to the Apache Software Foundation (ASF) under one or more C:\apache-jmeter-4.0\bin>rem contributor license agreements. See the NOTICE file distributed with C:\apache-jmeter-4.0\bin>rem this work for additional information regarding copyright ownership. C:\apache-jmeter-4.0\bin>rem The ASF licenses this file to You under the Apache License, Version 2.0 C:\apache-jmeter-4.0\bin>rem (the "License"); you may not use this file except in compliance with C:\apache-jmeter-4.0\bin>rem the License. You may obtain a copy of the License at C:\apache-jmeter-4.0\bin>rem C:\apache-jmeter-4.0\bin>rem http://www.apache.org/licenses/LICENSE-2.0 C:\apache-jmeter-4.0\bin>rem C:\apache-jmeter-4.0\bin>rem Unless required by applicable law or agreed to in writing, software C:\apache-jmeter-4.0\bin>rem distributed under the License is distributed on an "AS IS" BASIS, C:\apache-jmeter-4.0\bin>rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. C:\apache-jmeter-4.0\bin>rem See the License for the specific language governing permissions and C:\apache-jmeter-4.0\bin>rem limitations under the License. C:\apache-jmeter-4.0\bin>rem ===================================================== C:\apache-jmeter-4.0\bin>rem Environment variables that can be defined externally: C:\apache-jmeter-4.0\bin>rem C:\apache-jmeter-4.0\bin>rem Do not set the variables in this script. Instead put them into a script C:\apache-jmeter-4.0\bin>rem setenv.bat in JMETER_HOME/bin to keep your customizations separate. C:\apache-jmeter-4.0\bin>rem C:\apache-jmeter-4.0\bin>rem DDRAW - (Optional) JVM options to influence usage of direct draw, C:\apache-jmeter-4.0\bin>rem e.g. '-Dsun.java2d.ddscale=true' C:\apache-jmeter-4.0\bin>rem C:\apache-jmeter-4.0\bin>rem JMETER_BIN - JMeter bin directory (must end in ) C:\apache-jmeter-4.0\bin>rem C:\apache-jmeter-4.0\bin>rem JMETER_COMPLETE_ARGS - if set indicates that JVM_ARGS is to be used exclusively instead C:\apache-jmeter-4.0\bin>rem of adding other options like HEAP or GC_ALGO C:\apache-jmeter-4.0\bin>rem C:\apache-jmeter-4.0\bin>rem JMETER_HOME - installation directory. Will be guessed from location of jmeter.bat C:\apache-jmeter-4.0\bin>rem C:\apache-jmeter-4.0\bin>rem JM_LAUNCH - java.exe (default) or javaw.exe C:\apache-jmeter-4.0\bin>rem C:\apache-jmeter-4.0\bin>rem JM_START - set this to "start" to launch JMeter in a separate window C:\apache-jmeter-4.0\bin>rem this is used by the jmeterw.cmd script. C:\apache-jmeter-4.0\bin>rem C:\apache-jmeter-4.0\bin>rem JVM_ARGS - (Optional) Java options used when starting JMeter, e.g. -Dprop=val C:\apache-jmeter-4.0\bin>rem Defaults to '-Duser.language="en" -Duser.region="EN"' C:\apache-jmeter-4.0\bin>rem C:\apache-jmeter-4.0\bin>rem GC_ALGO - (Optional) JVM garbage collector options C:\apache-jmeter-4.0\bin>rem Defaults to '-XX:+UseG1GC -XX:MaxGCPauseMillis=100 -XX:G1ReservePercent=20' C:\apache-jmeter-4.0\bin>rem C:\apache-jmeter-4.0\bin>rem HEAP - (Optional) JVM memory settings used when starting JMeter C:\apache-jmeter-4.0\bin>rem Defaults to '-Xms1g -Xmx1g -XX:MaxMetaspaceSize=256m' C:\apache-jmeter-4.0\bin>rem C:\apache-jmeter-4.0\bin>rem ===================================================== C:\apache-jmeter-4.0\bin>setlocal C:\apache-jmeter-4.0\bin>rem Guess JMETER_HOME if not defined C:\apache-jmeter-4.0\bin>set "CURRENT_DIR=C:\apache-jmeter-4.0\bin" C:\apache-jmeter-4.0\bin>if not "" == "" goto gotHome C:\apache-jmeter-4.0\bin>set "JMETER_HOME=C:\apache-jmeter-4.0\bin" C:\apache-jmeter-4.0\bin>if exist "C:\apache-jmeter-4.0\bin\bin\jmeter.bat" goto okHome C:\apache-jmeter-4.0\bin>cd .. C:\apache-jmeter-4.0>set "JMETER_HOME=C:\apache-jmeter-4.0" C:\apache-jmeter-4.0>cd "C:\apache-jmeter-4.0\bin" C:\apache-jmeter-4.0\bin>if exist "C:\apache-jmeter-4.0\bin\jmeter.bat" goto okHome C:\apache-jmeter-4.0\bin>rem Get standard environment variables C:\apache-jmeter-4.0\bin>if exist "C:\apache-jmeter-4.0\bin\setenv.bat" call "C:\apache-jmeter-4.0\bin\setenv.bat" C:\apache-jmeter-4.0\bin>if not defined JMETER_LANGUAGE ( C:\apache-jmeter-4.0\bin>rem Minimal version to run JMeter C:\apache-jmeter-4.0\bin>set MINIMAL_VERSION=1.8.0 C:\apache-jmeter-4.0\bin>rem --add-modules java.activation if JAVA 9 C:\apache-jmeter-4.0\bin>set JAVA9_OPTS= C:\apache-jmeter-4.0\bin>for /F "tokens=3" %g in ('java -version 2>&1 | findstr /i "version"') do ( C:\apache-jmeter-4.0\bin>( C:\apache-jmeter-4.0\bin>if not defined JAVAVER ( set ERRORLEVEL=2 C:\apache-jmeter-4.0\bin>rem Check if version is from OpenJDK or Oracle Hotspot JVM prior to 9 containing 1.${version}.x C:\apache-jmeter-4.0\bin>rem JAVAVER will be equal to "9.0.4" (quotes are part of the value) for Oracle Java 9 C:\apache-jmeter-4.0\bin>rem JAVAVER will be equal to "1.8.0_161" (quotes are part of the value) for Oracle Java 8 C:\apache-jmeter-4.0\bin>rem so we extract 2 chars starting from index 1 C:\apache-jmeter-4.0\bin>IF "1." == "1." ( C:\apache-jmeter-4.0\bin>(set current_minor=8 ) C:\apache-jmeter-4.0\bin>for /F "delims=. tokens=1-3" %v in ("1.8.0") do (set minimal_minor=%w ) C:\apache-jmeter-4.0\bin>(set minimal_minor=8 ) C:\apache-jmeter-4.0\bin>if not defined current_minor ( set ERRORLEVEL=2 C:\apache-jmeter-4.0\bin>rem @echo Debug: CURRENT=8 - MINIMAL=8 C:\apache-jmeter-4.0\bin>if 8 LSS 8 ( set ERRORLEVEL=3 C:\apache-jmeter-4.0\bin>if not defined JM_LAUNCH (set JM_LAUNCH=java.exe ) C:\apache-jmeter-4.0\bin>if exist jmeter.bat goto winNT1 C:\apache-jmeter-4.0\bin>rem On NT/2K grab all arguments at once C:\apache-jmeter-4.0\bin>set JMETER_CMD_LINE_ARGS= C:\apache-jmeter-4.0\bin>rem The following link describes the -XX options: C:\apache-jmeter-4.0\bin>rem http://docs.oracle.com/javase/8/docs/technotes/tools/unix/java.html C:\apache-jmeter-4.0\bin>if not defined HEAP ( C:\apache-jmeter-4.0\bin>rem Uncomment this to generate GC verbose file with Java prior to 9 C:\apache-jmeter-4.0\bin>rem set VERBOSE_GC=-verbose:gc -Xloggc:gc_jmeter_%p.log -XX:+PrintGCDetails -XX:+PrintGCCause -XX:+PrintTenuringDistribution -XX:+PrintHeapAtGC -XX:+PrintGCApplicationConcurrentTime -XX:+PrintGCApplicationStoppedTime -XX:+PrintGCDateStamps -XX:+PrintAdaptiveSizePolicy C:\apache-jmeter-4.0\bin>rem Uncomment this to generate GC verbose file with Java 9 and above C:\apache-jmeter-4.0\bin>rem set VERBOSE_GC=-Xlog:gc*,gc+age=trace,gc+heap=debug:file=gc_jmeter_%p.log C:\apache-jmeter-4.0\bin>rem You may want to add those settings C:\apache-jmeter-4.0\bin>rem -XX:+ParallelRefProcEnabled -XX:+PerfDisableSharedMem C:\apache-jmeter-4.0\bin>if not defined GC_ALGO (set GC_ALGO=-XX:+UseG1GC -XX:MaxGCPauseMillis=100 -XX:G1ReservePercent=20 ) C:\apache-jmeter-4.0\bin>set SYSTEM_PROPS=-Djava.security.egd=file:/dev/urandom C:\apache-jmeter-4.0\bin>rem Always dump on OOM (does not cost anything unless triggered) C:\apache-jmeter-4.0\bin>set DUMP=-XX:+HeapDumpOnOutOfMemoryError C:\apache-jmeter-4.0\bin>rem Uncomment this if you run JMeter in DOCKER (need Java SE 8u131 or JDK 9) C:\apache-jmeter-4.0\bin>rem see https://blogs.oracle.com/java-platform-group/java-se-support-for-docker-cpu-and-memory-limits C:\apache-jmeter-4.0\bin>rem set RUN_IN_DOCKER=-XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap C:\apache-jmeter-4.0\bin>rem Additional settings that might help improve GUI performance on some platforms C:\apache-jmeter-4.0\bin>rem See: http://www.oracle.com/technetwork/java/perf-graphics-135933.html C:\apache-jmeter-4.0\bin>if not defined DDRAW ( C:\apache-jmeter-4.0\bin>rem Collect the settings defined above C:\apache-jmeter-4.0\bin>if not defined JMETER_COMPLETE_ARGS (set ARGS= -XX:+HeapDumpOnOutOfMemoryError -Xms1g -Xmx1g -XX:MaxMetaspaceSize=256m -XX:+UseG1GC -XX:MaxGCPauseMillis=100 -XX:G1ReservePercent=20 -Djava.security.egd=file:/dev/urandom -Duser.language="en" -Duser.region="EN" ) else (set ARGS= ) C:\apache-jmeter-4.0\bin>"C:\Program Files\Java\jdk1.8.0_162\bin" -XX:+HeapDumpOnOutOfMemoryError -Xms1g -Xmx1g -XX:MaxMetaspaceSize=256m -XX:+UseG1GC -XX:MaxGCPauseMillis=100 -XX:G1ReservePercent=20 -Djava.security.egd=file:/dev/urandom -Duser.language="en" -Duser.region="EN" -jar "C:\apache-jmeter-4.0\bin\ApacheJMeter.jar" C:\apache-jmeter-4.0\bin>rem If the errorlevel is not zero, then display it and pause C:\apache-jmeter-4.0\bin>if NOT errorlevel 0 goto pause C:\apache-jmeter-4.0\bin>if errorlevel 1 goto pause C:\apache-jmeter-4.0\bin>echo errorlevel=9009 C:\apache-jmeter-4.0\bin>pause |
@FSchumacher (migrated from Bugzilla): |
Manu (migrated from Bugzilla):
Oops.. I thought we don't need to specify the executable name.. only the path till bin is required. sorry if that's the case. |
@FSchumacher (migrated from Bugzilla): Is the current trunk bat working for you with environment variable (and with 'set "JM_LAUNCH=...\java"')? |
Manu (migrated from Bugzilla):
yes it's working after providing the environment variable in windows setting as JM_LAUNCH="C:\Program Files\Java\jdk1.8.0_162\bin\java". Also it works when we set it in setenv.bat |
logox01 (migrated from Bugzilla): The reason seems to be the quotes around the JM_LAUNCH variable (if JM_START="start"): %JM_START% "%JM_LAUNCH%" %ARGS% %JVM_ARGS% -jar "%JMETER_BIN%ApacheJMeter.jar" %JMETER_CMD_LINE_ARGS% Without the quotes it is working: %JM_START% %JM_LAUNCH% %ARGS% %JVM_ARGS% -jar "%JMETER_BIN%ApacheJMeter.jar" %JMETER_CMD_LINE_ARGS% BR |
@FSchumacher (migrated from Bugzilla): If you know of a better solution for this bug, you are welcomed to produce a patch :) |
logox01 (migrated from Bugzilla): rem JM_START - set this to "start" to launch JMeter in a separate window But in jmeterw.cmd it's used like you said - and it works if I use it like this :) Thanks |
@FSchumacher (migrated from Bugzilla): |
@FSchumacher (migrated from Bugzilla): URL: http://svn.apache.org/viewvc?rev=1825804&view=rev Correct documentation for usage of JM_START to start JMeter. Modified: |
@FSchumacher (migrated from Bugzilla): URL: http://svn.apache.org/viewvc?rev=1840236&view=rev As reported on the mailing list the space in quotes for the window title Follow-up to r1824800 and relates to #4694 Modified: |
Manu (Bug 62107):
It looks like jmeter.bat breaks with "C:\Program Files......." due to the space. JDK 1.8 64bit.
Debug: CURRENT=8 - MINIMAL=8
c:\apache-jmeter-3.2\bin>if 8 LSS 8 (
set ERRORLEVEL=3
goto pause
)
Files\Java\jdk1.8.0_162\bin\ was unexpected at this time.
c:\apache-jmeter-3.2\bin>if .C:\Program Files\Java\jdk1.8.0_162\bin\ == . set JM_LAUNCH=java.exe
c:\apache-jmeter-3.2\bin>
Severity: normal
OS: All
Duplicates:
The text was updated successfully, but these errors were encountered: