2 Ways To Discovery Tomcat Together With Coffee Version Inwards Linux Together With Windows

You tin uncovering Tomcat together with coffee version running on Linux either past times executing the org.apache.catalina.util.ServerInfo cast from catalina.jar or past times executing version.sh trounce script. The commencement solution volition function on whatever operating organisation including Windows together with UNIX because it's using a Java cast from a catalina.jar file, which is platform independent. Though, if y'all don't know how to run a cast from JAR file, y'all tin cheque the steps here. Alternatively, y'all besides accept a version.bat file within tomcat/bin directory to cheque the version of Tomcat inwards Windows. When y'all run this script inwards Linux or Windows it prints information near tomcat version, the coffee version used to run tomcat, Server built date, OS name, OS Version, architecture, JVM version together with JVM vendor etc.

Behind the scene, this batch file is besides running the ServerInfo cast from catalina.jar but it laid the necessary PATH together with Classpath variable for you. It's much convenient to run either version.sh inwards Linux or version.bat inwards Windows to acquire the Tomcat version.



2 ways to uncovering Apache Tomcat version inwards UNIX together with Windows

As discussed inwards the terminal paragraph, nosotros remove to run the ServerInfo cast from catalinar.jar to acquire the Tomcat version together with other meta-data. Let's run across examples of using these 2 ways to uncovering tomcat together with coffee version running tomcat inwards Windows first, followed past times Linux together with UNIX.


Solution 1 (Running ServerInfo class) :
a) become to tomcat installation directory together with run next ascendency :

$ coffee -cp lib/catalina.jar org.apache.catalina.util.ServerInfo

Here is how y'all acquire tomcat version inwards Windows :

C:\Program Files\Apache Software Foundation\Apache Tomcat 7.0.41>java -cp lib/catalina.jar org.apache.catalina.util.ServerInfo
Server version: Apache Tomcat/7.0.41
Server built:   Jun half dozen 2013 11:16:08
Server number:  7.0.41.0
OS Name:        Windows 8
OS Version:     6.2
Architecture:   amd64
JVM Version:    1.7.0_51-b13
JVM Vendor:     Oracle Corporation



By the way, If y'all don't accept catalina.jar inwards your tomcat/lib folder together with thence y'all may acquire :

Exception inwards thread "main" java.lang.NoClassDefFoundError: org/apache/catalina/util/ServerInfo
Caused by: java.lang.ClassNotFoundException: org.apache.catalina.util.ServerInfo
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)

In that case, simply cheque if version.sh or vesion.bat is acquaint inwards tomcat/bin directory equally suggested inwards our minute solution. But, if y'all are getting this fault fifty-fifty if y'all accept catalina.jar inwards the tomcat/lib folder, delight cheque out about of the steps given inwards my article 3 ways to solve NoClassDefFoundError inwards Java to troubleshoot further.




Solution 2 (using version.sh or version.bat) :
1) Go to tomcat/bin directory
2) Execute version.sh inwards Linux or version.bat inwards Windows

C:\Program Files\Apache Software Foundation\Apache Tomcat 7.0.41\bin>version.bat
Using CATALINA_BASE:   "C:\Program Files\Apache Software Foundation\Apache Tomcat 7.0.41"
Using CATALINA_HOME:   "C:\Program Files\Apache Software Foundation\Apache Tomcat 7.0.41"
Using CATALINA_TMPDIR: "C:\Program Files\Apache Software Foundation\Apache Tomcat 7.0.41\temp"
Using JRE_HOME:        "C:\Program Files\Java\jdk1.7.0_51"
Using CLASSPATH:       "C:\Program Files\Apache Software Foundation\Apache Tomcat 7.0.41\bin\bootstrap.jar;C:\Program Files\Apache Soft
ware Foundation\Apache Tomcat 7.0.41\bin\tomcat-juli.jar"
Server version: Apache Tomcat/7.0.41
Server built:   Jun half dozen 2013 11:16:08
Server number:  7.0.41.0
OS Name:        Windows 8
OS Version:     6.2
Architecture:   amd64
JVM Version:    1.7.0_51-b13
JVM Vendor:     Oracle Corporation


It's of import to define either JAVA_HOME or JRE_HOME to run version.bat, otherwise, y'all volition acquire next fault :

C:\Program Files\Apache Software Foundation\Apache Tomcat 7.0.41\bin>version.bat
Neither the JAVA_HOME nor the JRE_HOME environs variable is defined
At to the lowest degree 1 of these environs variables is needed to run this program


The "Server version" plain is the Tomcat version running on that machine. version.sh besides prints additional information related to JVM together with JRE version used to run tomcat inwards Linux or Windows.

If y'all are developing Java application inwards Tomcat, y'all tin besides acquire to a greater extent than near Tomcat past times reading Developing Java application inwards Tomcat, Eclipse Mars, together with MySQL.

 You tin uncovering Tomcat together with coffee version running on Linux either past times executing the  2 Ways to uncovering Tomcat together with Java Version inwards Linux together with Windows

That's all near how to uncovering Tomcat version inwards Linux together with Windows. By using version.sh, y'all tin besides uncovering the Java version used to run tomcat. If y'all desire to purpose a platform independent approach together with thence simply run ServerInfo cast from catalina.jar, which y'all tin uncovering within tomcat/lib directory. If y'all don't accept that JAR inwards lib directory together with thence cheque for version.sh or version.bat file inwards tomcat/bin directory, running them volition rank y'all all the information y'all desire near your tomcat installation.

Further Learning
Spring Framework 5: Beginner to Guru
tutorial)
  • How to setup JNDI database connection puddle inwards Tomcat? (guide)
  • Difference betwixt a Web server, Application server together with Servlet container? (answer)
  • How to ready java.lang.OutOfMemoryError: PermGen infinite inwards Tomcat (guide)
  • How to ready java.net.BindException: Cannot assign requested address: JVM_Bind inwards Tomcat (fix)
  • How to ready java.lang.OutOfMemoryError: coffee heap infinite inwards Tomcat (tutorial)
  • How to ready ThreadLocal retention leak inwards Tomcat? (solution)
  • How to ready java.net.SocketException: Too many opened upwards files  in Tomcat? (tutorial)
  • How to ready java.net.BindException: Address already inwards use: JVM_Bind:8080 (solution)
  • Why y'all shouldn't telephone telephone System.exit() inwards Tomcat? (article)


  • References
    Apache Tomcat Official Website

    0 Response to "2 Ways To Discovery Tomcat Together With Coffee Version Inwards Linux Together With Windows"

    Post a Comment

    Iklan Atas Artikel

    Iklan Tengah Artikel 1

    Iklan Tengah Artikel 2

    Iklan Bawah Artikel