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

service.bat incorrectly assumes JRE will have a 'client' directory #3928

Closed
stijnherreman opened this issue Oct 17, 2013 · 5 comments
Closed

Comments

@stijnherreman
Copy link

rem Check JVM server dll first
set JVM_DLL=%JAVA_HOME%\jre\bin\server\jvm.dll

if exist "%JVM_DLL%" goto foundJVM

set JVM_DLL=%JAVA_HOME%\bin\client\jvm.dll

if exist "%JVM_DLL%" (
echo Warning: JAVA_HOME points to a JRE and not JDK installation; a client (not a server^) JVM will be used...
) else (
echo JAVA_HOME points to an invalid Java installation (no jvm.dll found in "%JAVA_HOME%"^). Existing...
goto:eof
)

I have a JRE installation on a Windows Server system. It has no client directory, but it does have a server directory: C:\Program Files\Java\jre7\bin\server

@ghost ghost assigned costin Oct 24, 2013
@costin
Copy link
Member

costin commented Oct 24, 2013

What's your JAVA_HOME variable? Did you install a JDK or JRE (client or server)? x64 or 32 bit?
From the looks of it, it seems you have installed the JDK (on 64 bit) but the JAVA_HOME is incorrectly defined.

@stijnherreman
Copy link
Author

I've installed an x64 JRE.

Confirmed by the directory structure:

 Directory of C:\Program Files\Java

25/07/2013  12:31    <DIR>          .
25/07/2013  12:31    <DIR>          ..
25/07/2013  12:31    <DIR>          jre7

 Directory of C:\Program Files\Java\jre7

25/07/2013  12:31    <DIR>          .
25/07/2013  12:31    <DIR>          ..
25/07/2013  12:31    <DIR>          bin
25/07/2013  12:31             3.409 COPYRIGHT
25/07/2013  12:31    <DIR>          lib
25/07/2013  12:31                41 LICENSE
25/07/2013  12:31                47 README.txt
25/07/2013  12:31               451 release
25/07/2013  12:31           125.105 THIRDPARTYLICENSEREADME-JAVAFX.txt
25/07/2013  12:31           175.640 THIRDPARTYLICENSEREADME.txt
25/07/2013  12:31               983 Welcome.html

Confirmed by the registry key (Java Development Kit does not exist):

HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment

Confirmed by command line

>java -version
java version "1.7.0_25"
Java(TM) SE Runtime Environment (build 1.7.0_25-b17)
Java HotSpot(TM) 64-Bit Server VM (build 23.25-b01, mixed mode)

>javac -version
'javac' is not recognized as an internal or external command,
operable program or batch file.

My JAVA_HOME is set to C:\Program Files\Java\jre7

@costin
Copy link
Member

costin commented Oct 24, 2013

I've managed to reproduce this on Windows Server - it looks like on that particular OS the JRE installs a server jvm instead of the typical client one.

I've pushed a fix to 0.90 branch (master will follow) - let me know if it fixes your problem.

Cheers,

@costin costin closed this as completed Oct 24, 2013
costin added a commit that referenced this issue Oct 24, 2013
@stijnherreman
Copy link
Author

I've confirmed that this fixes the problem, thanks!

@costin
Copy link
Member

costin commented Oct 24, 2013

Great - thanks for the feedback!

mute pushed a commit to mute/elasticsearch that referenced this issue Jul 29, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants