Hi,
I am completely new in this forum but using XAMPP as my first test and development environment since... damn I'm getting old.
As a small note to the catalina_start.bat:
The script requires at least one of the keys in the windows registry.
My problem is, that it does not check for existing environment variables. If the registry entries are not defined, the script does not start tomcat, even if JAVA_HOME or JRE_HOME are already set.
Thus my small rework for the catalina_start.bat in the xampp directory:
I have modified the section FINDJRE32 not to go to ENDERROR and added two new section to take care of existing environment variables:
- Code: Select all
:FINDJRE32
reg query "%JREKeyName32%" /s
if %ERRORLEVEL% EQU 1 (
echo . [XAMPP]: Could not find 32 bit JRE
echo . [XAMPP]: Could not set JAVA_HOME or JRE_HOME. Looking for existing environment variables
goto FINDJDKENV
)
set KeyName=%JREKeyName32%
goto JRERUN
:FINDJDKENV
if NOT DEFINED JAVA_HOME (
echo . [XAMPP]: Could not find environment variable JAVA_HOME
echo . [XAMPP]: Looking environment variable JRE_HOME
goto FINDJREENV
)
goto JDKRUN
:FINDJREENV
if NOT DEFINED JRE_HOME (
echo . [XAMPP]: Could not find environment variable JRE_HOME
echo . [XAMPP]: Could not verify java location by reg query or environment variables
goto ENDERROR
)
goto JRERUN
IMHO the environment variables should checked first instead of querying the registry.
Because first, the installers of Java might have already set the environment variables, second it is more handy on a system with multiple Java installations, third most of the documentations and advices are about the environment variables.
But this would be a matter of taste if not even philosophical.
Greetings
Stefan