Starting Tomcat add-on XAMPP not working

回眸只為那壹抹淺笑 提交于 2019-12-22 07:45:14

问题


I installed XAMPP 1.7.7, including:

Apache 2.2.21 MySQL 5.5.16 PHP 5.3.8 phpMyAdmin 3.4.5 FileZilla FTP Server 0.9.39 Tomcat 7.0.21 (with mod_proxy_ajp as connector).

My all other services work expect for Tomcat.

Things that I did right now, to fix this: I realized that I did not had java on my computer, as on command prompt there was no path for java. So I installed JAVA 1.7.0 and also set the "Environment path".

But still its not getting started.

Any help would be appreciated.

Regards Zeeshan


回答1:


Assuming windows os,

Step 1. Create/edit an environment variable JAVA_HOME with path to jdk (important:- not to \bin but just c:\java\jdk_1_7_0 and dont put semicolon at the end).

step 2. Create/edit an environment variable JRE_HOME with path to jre (important:- again not to \bin but just the folder where bin is located and no semicolon in the end).

step 3. Create/edit an environment variable path that should be added like this,
< all the previous path stuff's >;%JAVA_HOME%/bin;.;

The xampp tomcat looks for %JAVA_HOME% or %JRE_HOME% individually, so just setting the path and classpath variables, up to the bin folder, will not work here. It works for standard Apache tomcat only.

Also, the your version of xampp have disabled the users by default. Enable it by un-commenting the user part in the x:\xampp\tomcat\conf\tomcat-users.xml




回答2:


You need to execute manually following bat file c:\xampp\catalina_start

or

put

catalina_start , catalina_stop

in XAMPP control panel start up




回答3:


I had the exact same problem and it was caused by running a 32 bits Tomcat on a 64 bits windows. (I was using XAMPP 1.8.3 in a Windows 8 64 bits.)

First:

  • Make sure you have JAVA_HOME system variable pointing to your jdk folder (not the \bin);
  • Make sure %JAVA_HOME%\bin; is in your %PATH% system variable.

The solution:

  • Uninstall the Tomcat7 service if you have installed it already;
  • Download a 64 bit version of Tomcat 7 for windows (check this link to get the latest - I used the 7.0.42 version);
  • Replace the tomcat7.exe and tomcat7w.exe files of the C:\xampp\tomcat\bin folder with those present in the recently downloaded zip file.

Now you can install the service as usual (through XAMPP control panel, if you use it) and it should start just fine.




回答4:


Just run the catalina.bat under the directory of C:\xampp\tomcat>

C:\xampp\tomcat>catalina.bat

CURRENT_DIR=%cd%" set "CATALINA_HOME=%CURRENT_DIR%"

Since %cd% echo the current directory.




回答5:


In environment variable add all these variable then catalina_start.bat will work

Variable Key
JAVA_HOME your java-jdk address
JRE_HOME your java-jre address

Path your java-jdk address ; your java-jre file address ; your java-jre/bin address ; our java-jdk/bin

It took me almost 5hours to find the method to let xampp-tomcat to start :'(



来源:https://stackoverflow.com/questions/7762818/starting-tomcat-add-on-xampp-not-working

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!