Fixes missing libtool dependency and adds Java package detection

This commit fixes the problem where the `apache-tomcat` package did not properly depend on the `libtool` package. Additionally, this commit adds code to detect the Java package installed on the build system and make that the dependent Java package for the subsequent `apache-tomcat` package.