I'm trying to install tomcat as a service in Windows Server 2008.
I searched in stackoverflow and can't find any answer to this problem, i can see other related questions which all of them are not the same (are related to code error 0, mine is code error 1) or have not valid answers, so i decided to create this question.
I'm using this to create the service:
https://tomcat.apache.org/tomcat-7.0-doc/windows-service-howto.html#Installing_services
tomcat7 //IS//Tomcat7 --DisplayName="Apache Tomcat 7" \
After the command, i can see in my Services list the Apache Tomcat 7 service, the problem is that it is stopped, if i try to start it, i can see this error:
Windows could not start the Apache Tomcat 7 on Local Computer. For
more information, review the System Event Log. If this is a
non-Microsoft service, contact the service vendor, and refer to
service-specific error code 1.
In the System Event Viewer i can see this log for this error:
The Apache Tomcat 7 service terminated with service-specific error Incorrect function..
I am using java 64 bits and i tested with both tomcat 32 and 64 bits, in both i have the same problem. I also tryed to open cmd.exe with administrator permission and i have the same problem...
Thanks for your help
FYI: if i start tomcat manually with startup.bat, it starts correctly