quento
quento

Reputation: 1114

Check Tomcat version

I have a question about Tomcat installation checking. I would like to create Installer for my application which needs Tomcat to be installed, so I need to check Tomcat installation, version of it on PC. I have some ideas like checking services or system variables? However, I am not sure that they are appropriate and version problem : different Tomcat's versions would have different names in services.

May be I need to ask user to set folder to Tomcat before?

So, could you help me with solution of this problem? I found similar questions on Stack, but I could't find an answer.

Upvotes: 0

Views: 10473

Answers (1)

user784540
user784540

Reputation:

As far as I know you cannot be 100% sure that Tomcat is not installed on the system, because it can be installed and launched using simple zip archive.

There are some workarounds, but they do not provide an elegant way to solve your task. For example, on Linux you can check whether is Tomcat running or not.

But a computer can have many tomcat instances on it, and described approach won't help you to determine the Tomcat instance you really need in your situation.

I think the best way is asking the administrator (user, who installs your application) to specify path to the Tomcat instance, which should be used for your application.

Upvotes: 2

Related Questions