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

Incorrect JVM_DLL environment variable definition in service.bat #3760

Closed
nathan-alden opened this Issue Sep 22, 2013 · 2 comments

Comments

Projects
None yet
3 participants
@nathan-alden
Copy link

nathan-alden commented Sep 22, 2013

I am running Windows 8 64-bit. First, I uninstalled all previous Java-related installations. I confirmed that I had no C:\Program Files\Java folders. I then downloaded and installed JRE 7 from the last download link on this page:

http://www.oracle.com/technetwork/java/javase/downloads/java-se-jre-7-download-432155.html

I confirmed that Java was installed properly. Here is the installed path to jvm.dll:

C:\Program Files\Java\jre7\bin\server\jvm.dll

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

Unfortunately, service.bat sets the JVM_DLL environment variable to this:

%JAVA_HOME%\jre\bin\server\jvm.dll

Note the extra jre path that does not exist with the JRE I installed. Perhaps this path changed in later versions of the JRE or in Oracle's installer? This problem causes the service to fail to start with this error:

[2013-09-22 14:23:27] [info]  [19408] Starting service...
[2013-09-22 14:23:27] [error] [19408] Failed creating java C:\Progra~1\Java\jre7\jre\bin\server\jvm.dll
[2013-09-22 14:23:27] [error] [19408] The system cannot find the path specified.
[2013-09-22 14:23:27] [error] [19408] ServiceStart returned 1

I fixed this easily by simply removing jre\ from the set JVM_DLL line. The batch file should probably use a different mechanism for determining the location of jvm.dll.

@ghost ghost assigned costin Oct 24, 2013

@costin

This comment has been minimized.

Copy link
Member

costin commented Oct 24, 2013

Hi.

This has been fixed through #3739 . You are installing a JRE (we recommend using a JDK) and service.bat will detect it accordingly. The fix will be available in the next release (0.90.6 and 1.0.0).

Can you please try master and report back?

Thanks.

@costin costin closed this Oct 24, 2013

@bittusarkar

This comment has been minimized.

Copy link

bittusarkar commented May 10, 2014

@costin This might not be the correct place to ask this but why do you recommend using a JDK over a JRE? Specifically what is the difference between %JAVA_HOME%\jre\bin\server\jvm.dll and %JAVA_HOME%\bin\server\jvm.dll?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.