开发者

Check if Tomcat and MySQL are already installed on machine

How can I check using Java if Tomcat and MySQL are already installed on machine? If it is installed I开发者_Go百科 have to disable those options in my installer.


If Tomcat is installed as a service on Windows, you can check the registry: HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software Foundation\Tomcat\[version]\InstallPath.

To read the registry from Java, you would need to use something like JNA, the methods Advapi32Util.registryGetKeys() and Advapi32Util.registryGetStringValue() can help.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜