Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Linux by (18.4k points)

I am trying to install the Tomcat and Ant on the Linux machine, but before installing them I wanted to check are they installed or not.

Regarding tomcat:

I surfed a lot in the following directories for tomcat

/usr/local/, /opt/, /usr/share/

but I didn't find my tomcat folder in any of my paths, doe that indicates that my tomcat is not installed? so actually

1. what is this path to `look/find` exactly to know/check whether tomcat is installed or not in 

   all Linux machines

2. what will be this path, tomcat will be installed exactly after the installation

3. How to find a version of tomcat on any of the Linux machine (if tomcat already installed) 

4. Is there any commands to look for both 'tomcat' installed and `ant` 

   installed

Regarding Ant:

I surfed and found the below command and got the below result after executing it

sh-4.2$ ant -v

result

sh-4.2$ ant -v

Apache Ant(TM) version 1.8.2 compiled on November 21 2011

Trying the default build file: build.xml

Buildfile: build.xml does not exist!

Build failed

so actually

1. Does this above result mean that `Ant` is installed ? or not?

2. what is my path to `look/find` exactly to know/check whether the ant is installed or not in 

   all Linux machines

3. what will be this path the `ant` will be installed exactly after installation

4. How to find my version of `Ant` on any Linux machine (if Ant already installed) 

1 Answer

0 votes
by (36.8k points)

Check whether they are present in the $PATH, if they are not in the $PATH, install one.

For ant:

ant -v stands for verbose, ant -version prints out its version.

   -help, -h

          print help on the command line options

   -projecthelp, -p

          gives information on possible targets for this project

   -version

          prints the version number and then exits ant

   -quiet, -q

          be extra quiet

   -verbose, -v

          be extra verbose

   -debug, -d

          print debugging information

   -emacs, -e

          produce logging information without adornments

   -logfile <file>, -l <file>

          use the given file to output log to

   -logger <classname>

          the class which is to perform logging

   -listener <classname>

          add an instance of the given class as a project listener

   -noinput

          do not allow interactive input

   -buildfile <file>, -file <file>, -f <file>

          use  the  given buildfile instead of the default build.xml file.

          This is the ant equivalent of Makefile

   -D<property>=<value>

          use value for the given property

   -keep-going, -k

          execute all targets that do not depend on failed target(s)

   -propertyfile <file>

          load all properties from file with -D properties  taking  prece-

          dence

   -inputhandler <class>

          the class which will handle input requests

   -find <file>, -s <file>

          (s)earch  for  buildfile  towards the root of the filesystem and

          use it

   -nice number

          A niceness value for the main thread: 1 (lowest)  to  10  (high-

          est); 5 is the default

   -nouserlib

          Run ant without using the jar files from ${user.home}/.ant/lib

   -noclasspath

          Run ant without using CLASSPATH

   -autoproxy

          Java 1.5+ : use the OS proxies

   -main <class>

          override ant's normal entry point

For tomcat:

if tomcat/bin is on the $PATH variable, version.sh will print out the version.

Come and join Linux training to gain great knowledge. 

Do check out the video below

Related questions

0 votes
1 answer
asked Dec 16, 2020 in Linux by blackindya (18.4k points)
0 votes
1 answer
asked Nov 29, 2020 in Linux by blackindya (18.4k points)
0 votes
1 answer

Browse Categories

...