Skip to content
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

gatling.bat does not start because of missing jvm.dll #2893

Closed
simdevmon opened this issue Jan 18, 2016 · 5 comments
Closed

gatling.bat does not start because of missing jvm.dll #2893

simdevmon opened this issue Jan 18, 2016 · 5 comments

Comments

@simdevmon
Copy link

When I execute gatling.bat I get the following error message

C:\Portable\gatling-charts-highcharts-bundle-2.1.7\bin>gatling.bat
GATLING_HOME is set to "C:\Portable\gatling-charts-highcharts-bundle-2.1.7"
Error: missing server' JVM atC:\Program Files (x86)\Java\jre1.8.0_66\bin\server\jvm.dll'.
Please install or use the JRE or JDK that contains these missing components.

I am using the following environment

  • Windows 10 Pro x64
  • JRE 1.8.0_66 x86 / JDK 1.8.0_66 (installed JDK bundle Windows x86 from Oracle)
  • Gatling 2.1.7

The recorder.bat works without any problems.

I found the following workaround:
Copy server directory from C:\Program Files (x86)\Java\jdk1.8.0_66\jre\bin to C:\Program Files (x86)\Java\jre1.8.0_66\bin.
In my opinion it would be better if gatling.bat would be executable straight away after a default installation of JavaSE.

@slandelle
Copy link
Member

Your issue is that your JAVA_HOME points to your JRE instead of your JDK. As explained in the install doc, Gatling needs a JDK, a JRE is not sufficient.

@simdevmon
Copy link
Author

The JAVA_HOME is set to JDK

C:>echo %JAVA_HOME%
C:\Program Files (x86)\Java\jdk1.8.0_66

However by default Oracle creates an entry for PATH with the value C:\PROGRAMDATA\ORACLE\JAVA\JAVAPATH that points to the JRE.

I still think it would be better to prefer JAVA_HOME over the default path if set.

@slandelle
Copy link
Member

Mmm, it seems that JAVA_HOME is being ignored in gatling.bat...

@simdevmon
Copy link
Author

Yes, this is what I mean. It should be something like this.

set JAVA=java
if exist "%JAVA_HOME%\bin\java.exe" goto gotSetJavaHome
goto gotRun

:gotSetJavaHome
set JAVA="%JAVA_HOME%\bin\java.exe"

:gotRun
rem Run the compiler
set COMPILATION_CLASSPATH=""
for %%i in ("%GATLING_HOME%\lib\*.jar") do call :addToPath "%%i"
%JAVA% %COMPILER_OPTS% -cp %COMPILER_CLASSPATH% io.gatling.compiler.ZincCompiler -ccp %COMPILATION_CLASSPATH% %USER_ARGS%  2>NUL
rem Run Gatling
%JAVA% %JAVA_OPTS% -cp %GATLING_CLASSPATH% io.gatling.app.Gatling %USER_ARGS%

If you like I can also create a PR for this.

@slandelle
Copy link
Member

@simdevmon thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants