Wednesday, May 23, 2012

How to resolve xampp 1.7.7 Tomcat startup issue

When trying to start up tomcat service in xampp 1.7.7 or earlier, it may not be able to startup properly. Following are the message I noticed when trying to execute it:

C:\xampp>"Copy of catalina_start.bat"

[XAMPP]: Searching JDK HOME with reg query ...

Error: The system was unable to find the specified registry key or value
. [XAMPP]: Cannot find current JDK installation!
. [XAMPP]: Cannot set JAVA_HOME. Aborting ...
done.
Press any key to continue . . .


This issue may happen if the installed Java Environment is not Java Development Kit but Java JRE. As such, to overcome this issue, we will need to modify the catalina_start.bat startup script as follows:

::set KeyName=HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Development Kit
set KeyName=HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment

Also, the following lines are comment out in the catalina_stop.bat script:

::set KeyName=HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Development Kit
set KeyName=HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment

Hope that this will help you in resolving Tomcat issue in xampp environment. Do let me know if you have better way of overcome this issue.

No comments:

Post a Comment