I installed Lucee onto my Windows 10 laptop last night, but right at the
end of the installation it gave an error saying that the service could not
be started. Upon inspection, this was because the service had failed to be
created in the fist place.
The install.log give the following details:================
Configuring Lucee-Tomcat Service
Executing C:\lucee\tomcat\bin\service.bat install Lucee
Script exit code: 0
Script output:
The JAVA_HOME environment variable is not defined correctly
This environment variable is needed to run this program
NB: JAVA_HOME should point to a JDK not a JRE
Taking a look in the service.bat file, the following line sets a variable
for the path to the JDK:
set “JRE_HOME=C:\lucee\jdk”
It then goes on to validate the JDK using the following:
if not exist “%JRE_HOME%\bin\java.exe” goto noJavaHome
if not exist “%JRE_HOME%\bin\javaw.exe” goto noJavaHome
goto okJavaHome
However, in my case, the “%JRE_HOME%\bin\javaw.exe” file does not exist,
and so the script fails at that point and outputs the error message.
To get around this, I set the JRE_HOME variable to point to another JDK
that I have on my laptop and ran the script manually. It com completed
successfully and the service is now setup and running.
I guess that there is a problem with either the missing file or the
service.bat script in the current installer??
The script is failing probably on line 58:
if not exist “%JRE_HOME%\bin\javaw.exe” goto noJavaHome
since the JDK/bin folder doesn’t contain javaw.exe.
Clayton DavisOn Wednesday, February 15, 2017 at 9:45:47 AM UTC-5, mar...@cubicstate.com wrote:
Hi,
I installed Lucee onto my Windows 10 laptop last night, but right at the
end of the installation it gave an error saying that the service could not
be started. Upon inspection, this was because the service had failed to be
created in the fist place.
Script output:
The JAVA_HOME environment variable is not defined correctly
This environment variable is needed to run this program
NB: JAVA_HOME should point to a JDK not a JRE
Taking a look in the service.bat file, the following line sets a variable
for the path to the JDK:
set “JRE_HOME=C:\lucee\jdk”
It then goes on to validate the JDK using the following:
if not exist “%JRE_HOME%\bin\java.exe” goto noJavaHome
if not exist “%JRE_HOME%\bin\javaw.exe” goto noJavaHome
goto okJavaHome
However, in my case, the “%JRE_HOME%\bin\javaw.exe” file does not exist,
and so the script fails at that point and outputs the error message.
To get around this, I set the JRE_HOME variable to point to another JDK
that I have on my laptop and ran the script manually. It com completed
successfully and the service is now setup and running.
I guess that there is a problem with either the missing file or the
service.bat script in the current installer??