Here's my problem: I have a WAR file which contains my webapp, and a .jar in its WEB-INF/lib which depends on .so files to be present on the host where Tomcat is running. When I deploy my WAR file through the app manager, I get an UnsatisfiedLinkError: file not found in the startup logs when the JNI wrapper class is loaded from the .jar. When I look in the directory where the linked libraries are, they are clearly present, and have world read and execute permissions, and I've even changed the owner to be the same run-as user executing tomcat. I am fairly certain this is a permissions problem, because I can execute the WAR file on the command line, and I do not get the error. I'm hoping that someone can spot something I have missed, or direct me to some Tomcat documentation I've misread.
Here's the full text of the error when deployed via Tomcat manager:
07 Apr 2017 10:45:53,140 [ERROR] [... omitted irrelevant log output ...] java.lang.UnsatisfiedLinkError: /opt/omitted-sdk-name/linux_x86_64/bin/libjni_emdq.so: libemdq.so: cannot open shared object file: No such file or directory
If I shut down tomcat via systemctl stop tomcat and execute my war file like this (as root), I do not get the UnsatisfiedLinkError:
java -Djava.library.path=/opt/omitted-sdk-name/linux_x86_64/bin -jar /path/to/my/app##0.1.war
Some other useful info:
CentOS 7
Fresh, vanilla install via yum (no deviations from default config, except to enable the admin user on the manager and switch the default jvm).
/usr/sbin/tomcat version shows:
Server version: Apache Tomcat/7.0.69
Server built: Nov 6 2016 01:55:51 UTC
Server number: 7.0.69.0
OS Name: Linux
OS Version: 3.10.0-514.10.2.el7.x86_64
Architecture: amd64
JVM Version: 1.8.0_121-b13
JVM Vendor: Oracle Corporation
Tomcat is running as user tomcat
I've tried changing ownership from root to tomcat of all the .so files in this sdk. Changing owners did not change the actual behavior. For example, this owner/mode yields the problem - same owner as the tomcat run-as user, and full read+executable permission, which I expected would have fixed things:
[root#omitted-host bin]# ls -la | grep emdq
-rwxr-xr-x 1 tomcat tomcat 403153 Nov 10 03:10 libemdq.so
-rwxr-xr-x 1 tomcat tomcat 76850 Nov 10 03:11 libjni_emdq.so
EDIT: There seems to be two versions of Java on this machine. The one in root's path is 1.8.0_77 and the one configured for tomcat is 1.8.0_121:
[root#omitted-host tomcat]# java -version
java version "1.8.0_77"
Java(TM) SE Runtime Environment (build 1.8.0_77-b03)
Java HotSpot(TM) 64-Bit Server VM (build 25.77-b03, mixed mode)
[root#omitted-host tomcat]# /etc/alternatives/jre_1.8.0_openjdk/bin/java -version
openjdk version "1.8.0_121"
OpenJDK Runtime Environment (build 1.8.0_121-b13)
OpenJDK 64-Bit Server VM (build 25.121-b13, mixed mode)
output of file on the two .so in question shows they are 64-bit libs, so I don't think there's a problem with running in a 64-bit JVM:
[root#omitted-host bin]# file libjni_emdq.so
libjni_emdq.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, not stripped
[root#omitted-host bin]# file libemdq.so
libemdq.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, not stripped
I have these lines in a file in $CATALINA_HOME/conf/conf.d/omittedname.conf. At some point in the past, I had them in tomcat.conf but either location seems to yield the same results.
MY_BIN="/opt/omitted-sdk-name/linux_x86_64/bin"
LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$MY_BIN"
JAVA_OPTS="$JAVA_OPTS -Djava.library.path=$MY_BIN -Djava.security.egd=file:/dev/./urandom -Djava.awt.headless=true -XX:+UseConcMarkSweepGC"
# needed to run the application
JAVA_OPTS="$JAVA_OPTS -Dprofile=test"
EDIT: after posting this, I noticed that root has a different jvm in its path. Java version above was edited too.
[root#omitted-host tomcat]# echo $PATH
/java/jdk1.8.0_77/bin:/opt/omitted-sdk-name/linux_x86_64/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin
Is there anything else I can try looking at? Do I possibly need to add a java.io.FilePermissions permission?
Also, just a humble statement that I am aware of the implications of running/owning things as root. My goal is just to get back to a working tomcat manager configuration to un-break this development server.
This answer is less than satisfying, but it was the key to solving my problem. I had to move the statement LD_LIBRARY_PATH=/opt/omitted-sdk-name/linux_x86_64/bin from $CATALINA_HOME/conf/conf.d/myapp.conf to $CATALINA_HOME/conf/tomcat.conf. After I did this, the UnsatisfiedLinkError disappeared.
I'm currently setting up a Tomcat Server under Ubuntu 14.10.
in ${CATALINA_HOME}/RUNNING.txt it says, that either JAVA_HOME or JRE_HOME need to be set. I filled the file ${CATALINA_HOME}/bin/setenv.sh with:
JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64
since
sudo dpkg -L 'openjdk-7-jdk'
indicated that this is the place where my JDK is installed. To test the location, i also tried:
JAVA_HOME=/usr/lib/jvm/some-none-existing-place
which gave no error when starting tomcat using ${CATALINA_HOME}/bin/startup.sh (although the path does obviously not exist)
So, when is this variable used by Tomcat and how can I check if I set the correct path (for Tomcat)?
Type in terminal,
echo $JAVA_HOME
It will display JAVA_HOME variable path.
IF nothing appears then you can set it manually by,
export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64
This will differ according to your JDK type & version
Edit: Also you just follow the below to ensure you set in tomcat configuration file.
Hit Ctrl+Alt+T to open terminal and run:
sudo gedit /etc/default/tomcat7
Find commented JAVA_HOME, uncomment and change the directory to your JDK environment. Restart now and check for the error.
Open a command prompt, type :
java -version
java version "1.8.0_60" Java(TM)
SE Runtime Environment (build > 1.8.0_60-b27)
Java HotSpot(TM) 64-Bit Server VM (build 25.60-b23, mixed mode)
javac -version
javac 1.8.0_60
echo %JAVA_HOME%
C:\Program Files\Java\jdk1.8.0_60
So, what is your problem:
a) Tomcat does not start, or
b) it starts, but you do not know what version of Java it is using?
Check that your setenv.sh file is readable. If it is not readable, it will be ignored.
If JRE_HOME variable is set then JAVA_HOME will be ignored.
If neither one is set, then there are some defaults that are tried, including a call to which java. (The magic is in ${CATALINA_HOME}/bin/setclasspath.sh).
The ${CATALINA_HOME}/bin/version.sh script will print the versions of Tomcat and Java.
Tomcat scripts print the actual value of JRE_HOME when Tomcat starts if you have a terminal. (if [ $have_tty -eq 1 ]; block in catalina.sh).
In recent versions of Tomcat a org.apache.catalina.startup.VersionLoggerListener can be configured in server.xml and will print the path to java and other settings.
http://tomcat.apache.org/tomcat-8.0-doc/config/listeners.html
I'm trying to get Appfuse + Tomcat + jRebel working.
Appfuse by default uses Cargo to download tomcat (ver. 7.0.33) and deploy the application to it. I wish to use an already installed tomcat (ver. 7.0.27) instead of the downloaded one. I made the change following the appfuse FAQ.
After deploying with mvn cargo:run, how can I know that the actual running tomcat is indeed 7.0.27?
I used to type a wrong URL (ex. localhost:8080/dfsfsdf) to see it in the error page, but now it shows nothing.
My $CATALINA_HOME points to my own tomcat 7.0.27.
sorry forgot to mention, it's for Windows.
Update:
Since this question had become somehow popular, I would like to explain why that accepted answer. simple, it was the first one which solved my problem.
I am looking at the title of the question, #Tech Junkie and #CPU 100 really have the best answer, but not for the scenario I was encountered. (I was wanting to know if mvn cargo:run runs my installed tomcat or a "project embeded" tomcat) :)
Though this is not recent, I thought, my answer can still help others:
cd tomcat/lib
java -cp catalina.jar org.apache.catalina.util.ServerInfo
and that's it.
Server version: Apache Tomcat/7.0.30
Server built: May 23 2013 02:54:10
Server number: 7.0.30.0
OS Name: Linux
OS Version: 3.13.0-36-generic
Architecture: amd64
JVM Version: 1.7.0_65-b32
JVM Vendor: Oracle Corporation
Try parsing or executing the Tomcat_home/bin directory and look for
a script named version.sh or version.bat depending on your
operating system.
Execute the script ./version.sh or version.bat
If there are no version.bat or version.sh then
use a tool to unzipping JAR files (\tomcat\server\lib\catalina.jar) and look in the file org\apache\catalina\util\lib\ServerInfo.properties.
the version defined under "server.info=".
execute the script in your tomcat/bin directory:
sh tomcat/bin/version.sh
Server version: Apache Tomcat/7.0.42
Server built: Jul 2 2013 08:57:41
Server number: 7.0.42.0
OS Name: Linux
OS Version: 2.6.32-042stab084.26
Architecture: amd64
JVM Version: 1.7.0_21-b11
JVM Vendor: Oracle Corporation
if you can upload a JSP file you may print out some info like in this example: bestdesigns.co.in/blog/check-jsp-tomcat-version
Save this code into a file called tomcat_version.jsp:
Tomcat Version : <%= application.getServerInfo() %><br>
Servlet Specification Version :
<%= application.getMajorVersion() %>.<%= application.getMinorVersion() %> <br>
JSP version :
<%=JspFactory.getDefaultFactory().getEngineInfo().getSpecificationVersion() %><br>
When you access, http://example.com/tomcat_version.jsp, the output should look similar to:
Tomcat Version : Apache Tomcat/5.5.25
Servlet Specification Version : 2.4
JSP version: 2.0
You can simply open http://localhost:8080/ in your web browser
and this will open Tomcat welcome page that shows running Tomcat version like this:
Apache Tomcat/7.0.42
I assume that your Tomcat is running on port 8080
For windows machine
Go to the tomcat directory C:\apache-tomcat-x.0.xx\bin
bin>version.bat
Using CATALINA_BASE: "C:\apache-tomcat-x.0.xx"
Using CATALINA_HOME: "C:\apache-tomcat-x.0.xx"
Using CATALINA_TMPDIR: "C:\apache-tomcat-x.0.xx\temp"
Using JRE_HOME: "C:\Program Files\Java\jdk1.8.0_65"
Using CLASSPATH: "C:\apache-tomcat-x.0.xx\bin\bootstrap.jar;C:\apache-tomcat-x.0.xx\bin\tomcat-juli.jar"
Server version: Apache Tomcat/7.0.53
For Linux Machine
Go to the tomcat directory /usr/mack/apache-tomcat-x.0.xx/bin
# ./version.sh
Using CATALINA_BASE: /usr/mack/apache-tomcat-x.0.xx
Using CATALINA_HOME: /usr/mack/apache-tomcat-x.0.xx
Using CATALINA_TMPDIR: /usr/mack/apache-tomcat-x.0.xx/temp
Using JRE_HOME: /usr/java/jdk1.7.0_71/jre
Using CLASSPATH: /usr/mack/apache-tomcat-x.0.xx/bin/bootstrap.jar:/usr/mack/apache-tomcat-x.0.xx/bin/tomcat-juli.jar
Server version: Apache Tomcat/7.0.56
If Tomcat is installed as a service:
#sudo /etc/init.d/tomcat version
I had this challenge when working on an Ubuntu 18.04 Linux server.
Here's how I fixed it:
Run the command below to determine the location of your version.sh file:
sudo find / -name "version.sh"
For me the output was:
/opt/tomcat/bin/version.sh
Then, using the output, run the file (version.sh) as a shell script (sh):
sh /opt/tomcat/bin/version.sh
That's all.
I hope this helps
Using the release notes
In the main Tomcat folder you can find the RELEASE-NOTES file which contains the following lines (~line 20-21):
Apache Tomcat Version 8.0.22
Release Notes
Or you can get the same information using command line:
Windows:
type RELEASE-NOTES | find "Apache Tomcat Version"
Output:
Apache Tomcat Version 8.0.22
Linux:
cat RELEASE-NOTES | grep "Apache Tomcat Version"
Output:
Apache Tomcat Version 8.0.22
This one command which you can check almost everything:
java -cp tomcat/lib/catalina.jar org.apache.catalina.util.ServerInfo
or
tomcat/bin/catalina.sh version
And the output looks like this
Server version: Apache Tomcat/8.5.24
Server built: Nov 27 2017 13:05:30 UTC
Server number: 8.5.24.0
OS Name: Linux
OS Version: 4.4.0-137-generic
Architecture: amd64
JVM Version: 1.8.0_131-b11
JVM Vendor: Oracle Corporation
The version of currently running Tomcat
If you set the environtment variable - %CATALINA_HOME%, then
Windows :
>> cd %CATALINA_HOME%\bin
>> version
Alternatively,
java.exe -cp lib\catalina.jar org.apache.catalina.util.ServerInfo
MY SETTING --- Hope yours will be similar to as follows
%CATALINA_HOME% --- C:\Program Files\Tomcat\apache-tomcat-8.0.28
OUTPUT
Server version: Apache Tomcat/8.0.28
Server built: Oct 7 2015 18:25:21 UTC
Server number: 8.0.28.0
OS Name: Windows 7
OS Version: 6.1
Architecture: amd64
JVM Version: 1.8.0_111-b14
JVM Vendor: Oracle Corporation
To find out the Tomcat version, find this file – version.sh for *nix or version.bat for Windows. This version.sh file is normally located in the Tomcat bin folder.
phpmongodb#kumar:/usr/share/tomcat7/bin$ ./version.sh
Note
If you are not sure where is the version.sh file, try this command :
sudo find / -name "version.sh"
Find out everything about Tomcat7.
sudo find / -name "tomcat7"
run the following
/usr/local/tomcat/bin/catalina.sh version
its response will be something like:
Using CATALINA_BASE: /usr/local/tomcat
Using CATALINA_HOME: /usr/local/tomcat
Using CATALINA_TMPDIR: /var/tmp/
Using JRE_HOME: /usr
Using CLASSPATH: /usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/tomcat-juli.jar
Using CATALINA_PID: /var/catalina.pid
Server version: Apache Tomcat/7.0.30
Server built: Sep 27 2012 05:13:37
Server number: 7.0.30.0
OS Name: Linux
OS Version: 2.6.32-504.3.3.el6.x86_64
Architecture: amd64
JVM Version: 1.7.0_60-b19
JVM Vendor: Oracle Corporation
I know it is maybe too late for this, but this could be usefull:
If you try to know Apache Tomcat Server version from Java code, you can use:
from a HttpServlet:
protected void doGet(HttpServletRequest request, HttpServletResponse response) {
getServletContext().getServerInfo()
}
from a ServletContextListener:
public void contextInitialized(ServletContextEvent event) {
event.getServletContext().getServerInfo();
}
Another option is view release notes from tomcat,applicable to linux/window
{Tomcat_home}/webapps/ROOT/RELEASE-NOTES.txt
If Tomcat is installed as a service, try:
sudo /etc/init.d/tomcat version
Swap out "tomcat" with the actual name of the service.
In Linux to check the tomcat version
cd /opt/tomcat/bin
./catalina.sh version
Enter 404.jsp or non-existent.jsp.
Get Tomcat/JBoss version number at bottom of page.
Open your tomcat home page (Usually localhost:8080)
You will see something like this:
For Windows PowerShell command-line method of checking running version(s) of Tomcat service:
(get-service Tomcat*).DisplayName
Sample output...
Apache Tomcat 8.5 Tomcat8
If also want to know additional details including the location of folder where service running at:
Get-WmiObject win32_service | Where-Object {$_.Name -like 'Tomcat*'} | select Name, DisplayName, State, PathName
Sample output...
Name DisplayName State PathName
---- ----------- ----- --------
Tomcat8 Apache Tomcat 8.5 Tomcat8 Running "C:\Program Files\Apache Software Foundation\Tomcat 8.5\bin\Tomcat8.exe" /...
run on terminal of the Unix server
w3m http://localhost:8080/
to quit press q and next y
For securing Tomcat from hackers, it's recommended that we try a few steps at hiding the tomcat version information. The OWASP project suggests a few steps. https://www.owasp.org/index.php/Securing_tomcat . If a tomcat installation is thus protected, then only 1 of the above answers will show the version of tomcat. i.e going through the $TOMCAT_HOME\RELEASE-NOTES file where the version number is clearly announced.
I had one such protected server and only the RELEASE-NOTES file revealed the version of the tomcat. all other techniques failed to reveal the version info.
We are running in a Windows environment and I had to find a way to get the Tomcat version outside of the Java environment. Without knowing the version, I could not determine the directories. I finally found the best way was to query the Tomcat service using:
C:\temp>sc query | find /I "tomcat"
SERVICE_NAME: Tomcat6
DISPLAY_NAME: Apache Tomcat 6.0 Tomcat6
You can find out the server information through its status page:
{running-tomcat-url}/manager/status
On that page you can see the version of Java on which your Tomcat runs
Note: I have also pasted this answer on Tomcat6 and JRE7 compatibility issue. Unsupported major.minor version 51.0
On Windows just cmd
C:\Program Files (x86)\Extensis\Portfolio Server\applications\tomcat\bin>version
check yout tomcat log directory.
goto /var/log/tomcat8/
view the file: catalina.out
it will show the tomcat version below:
Server version name: Apache Tomcat/8.5.72
04-Feb-2022 04:00:58.537 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built: Oct 28 2021 00:54:01 UTC
04-Feb-2022 04:00:58.537 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version number: 8.5.72.0
04-Feb-2022 04:00:58.537 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name: Linux
04-Feb-2022 04:00:58.537 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture: amd64
04-Feb-2022 04:00:58.537 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version: 1.8.0_312-b07
These Following 4 ways can be used to find out Apache Tomcat Version in Linux:
1). Linux via Version Script in Tomcat Bin Directory:
Locate the Tomcat`s bin Directory that is being used
Check for version.sh script exists, i.e. ll version.sh
Execute the script either way: sh version.sh OR ./version.sh
This will output you sample as below:
2). Check Tomcat Version in Linux Command Line
ps -ef |grep -i tomcat // this is will output and you will need to eye-ball to find version, sample below
3). Get Tomcat version via Catalina.jar
Execute the following CMD in terminal, you will need to locate Lib folder in Tomcat
java -cp tomcat/lib/catalina.jar org.apache.catalina.util.ServerInfo
4). Get Tomcat version through JSP
Create JSP page with the below code
Then try to open the JSP via Tomcat in the Browser
This will output the Tomcat Version you are running.
Tomcat Version : <%= application.getServerInfo() %> Servlet
Specification Version : <%= application.getMajorVersion() %>. <%=
application.getMinorVersion() %> JSP version :
<%=JspFactory.getDefaultFactory().getEngineInfo().getSpecificationVersion()
%>
Windows task manager > Processes > find tomcat > right click > open file location > if you run Tomcat7w.exe it is visible at description.
Tomcat should running to be visible at Processes if not at Windows Vista/7 go to task manager > tab (services) find tomcat start it and then processes.
In Unix-like environments, I also recommend checking the actual running process command line:
$ ps aux | grep java
...
/usr/lib/jvm/java-8-openjdk-amd64/bin/java -Djava.util.logging.config.file=/srv/tomcat-instances/bla/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.awt.headless=true -Xmx4096M -XX:+UseConcMarkSweepGC -Djdk.tls.ephemeralDHKeySize=2048 -Djava.protocol.handler.pkgs=org.apache.catalina.webresources -agentlib:jdwp=transport=dt_socket,address=8000,server=y,suspend=n -Xmx4096m -Xms4096m -XX:MaxPermSize=2048m -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.port=8090 -Dcom.sun.management.jmxremote.rmi.port=8090 -Djava.rmi.server.hostname=localhost -Djava.endorsed.dirs=/opt/apache-tomcat-8.0.47/endorsed -classpath /opt/apache-tomcat-8.0.47/bin/bootstrap.jar:/opt/apache-tomcat-8.0.47/bin/tomcat-juli.jar -Dcatalina.base=/srv/tomcat-instances/bla -Dcatalina.home=/opt/apache-tomcat-8.0.47 -Djava.io.tmpdir=/tmp/tomcat8-bla-tmp org.apache.catalina.startup.Bootstrap start
...
One can run on subtle weird behaviors due to (operating system) environment variables and (Java) system properties being set to unexpected values. I had a situation where due to an outdated Tomcat setenv.sh, A Tomcat 8 started with classes from a Tomcat 7 on the classpath. Make sure that in the process command line options such as -Dcatalina.base, -Dcatalina.home and -classpath make sense.
Simply start tomcat and search for "Server version name" in catalina.logs and you will get version of your tomcat.
For example:
"Mar 07, 2019 11:25:40 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Server version name: Apache Tomcat/9.0.16"
To know exact tomcat version alone, just visit vi tomcat/BUILDING.txt
Is there a OS command to find what Java version Tomcat6 is using?
I need to use a Perl (including system()) command.
I using Linux. Ubuntu and CentOS
Is there something like?
tomcat6 version
/usr/local/tomcat6/bin/catalina.sh version
At first you need to understand first, that Tomcat is a Java application.
So, to see which java version Tomcat is using, you can just simply find the script file from which Tomcat is started, usually catalina.sh.
Inside this file, you will get something like below:
catalina.sh:# JAVA_HOME Must point at your Java Development Kit installation.
catalina.sh:# Defaults to JAVA_HOME if empty.
catalina.sh: [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
catalina.sh: JAVA_HOME=`cygpath --absolute --windows "$JAVA_HOME"`
catalina.sh: echo "Using JAVA_HOME: $JAVA_HOME"
By default, JAVA_HOME should be empty, which mean it will use the default version of java, or you can test with: echo $JAVA_HOME
And then use "java -version" to see which version you default java is.
And vice versa by setting this property: JAVA_HOME, you can configure which Java version to use when starting Tomcat.
Once you have started tomcat simply run the following command at a terminal prompt:
ps -ef | grep tomcat
This will show the process details and indicate which JVM (by folder location) is running tomcat.
If tomcat did not start up yet , you can use the command \bin\cataline version to check which JVM will the tomcat use when you start tomcat using bin\startup
In fact ,\bin\cataline version just call the main class of org.apache.catalina.util.ServerInfo , which is located inside the \lib\catalina.jar . The org.apache.catalina.util.ServerInfo gets the JVM Version and JVM Vendor by the following commands:
System.out.println("JVM Version: " +System.getProperty("java.runtime.version"));
System.out.println("JVM Vendor: " +System.getProperty("java.vm.vendor"));
So , if the tomcat is running , you can create a JSP page that call org.apache.catalina.util.ServerInfo or just simply call the above System.getProperty() to get the JVM Version and Vendor . Deploy this JSP to the running tomcat instance and browse to it to see the result.
Alternatively, you should know which port is the running tomcat instance using . So , you can use the OS command to find which process is listening to this port. For example in the window , you can use the command netstat -aon to find out the process ID of a process that is listening to a particular port . Then go to the window task manager to check the full file path of this process ID belongs to. .The java version can then be determined from that file path.
Or you could use the Probe application and just look at its System Info page. Much easier than writing code, and once you start using it you'll never go back to Tomcat Manager.
You can use the Tomcat manager app to find out which JRE and OS versions Tomcat is using. Given a user tomcat with password password with a role of manager:
Tomcat 6:
curl http://tomcat:password#localhost:8080/manager/serverinfo
Tomcat 7/8:
curl http://tomcat:password#localhost:8080/manager/text/serverinfo
For Windows, launch cmd prompt and route to the path(usually bin) where you have your tomcat startup script.
C:\opt\isv\tomcat-7.0\grid\bin>version
Using CATALINA_BASE: "C:\opt\isv\tomcat-7.0\grid"
Using CATALINA_HOME: "C:\opt\isv\tomcat-7.0\grid"
Using CATALINA_TMPDIR: "C:\opt\isv\tomcat-7.0\grid\temp"
Using JRE_HOME: "C:\opt\isv\devtools\jdk1.8.0_45"
Using CLASSPATH: "C:\opt\isv\tomcat-7.0\grid\bin\bootstrap.jar;C:\opt\isv\tomcat-7.0\grid\bin\tomcat-juli.jar"
Server version: Apache Tomcat/7.0.55
Server built: Jul 18 2014 05:34:04
Server number: 7.0.55.0
OS Name: Windows 7
OS Version: 6.1
Architecture: x86
JVM Version: 1.8.0_45-b15
JVM Vendor: Oracle Corporation
C:\opt\isv\tomcat-7.0\grid\bin>
After installing tomcat, you can choose "configure tomcat" by search in "search programs and files". After clicking on "configure Tomcat", you should give admin permissions and the window opens. Then click on "java" tab. There you can see the JVM and JAVA classpath.
To find it from Windows OS,
Open command prompt and change the directory to tomcat/tomee /bin directory.
Type catalina.bat version
It should print jre version details along with other informative details.
Using CATALINA_BASE: "C:\User\software\enterprise-server-tome...
Using CATALINA_HOME: "C:\User\software\enterprise-server-tome...
Using CATALINA_TMPDIR: "C:\User\software\enterprise-server-tome...
Using JRE_HOME: "C:\Program Files\Java\jdk1.8.0_25"
Using CLASSPATH: "C:\User\software\enterprise-server-tome...
Server version: Apache Tomcat/8.5.11
Server built: Jan 10 2017 21:02:52 UTC
Server number: 8.5.11.0
OS Name: Windows 7
OS Version: 6.1
Architecture: amd64
JVM Version: 1.8.0_25-b18
JVM Vendor: Oracle Corporation