Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to print or get JRE version of an application running on a server?

Tags:

java

I mean using javacode I want to find the JRE version of application but not server. In my production server I am having thousands of applications in java like tomcat,websphere,axway etc. I want to know particular application jre version.I will write a class and I want print using that. That class will be placed in particular application.

I tried this link but I didn't get it.

like image 301
sunleo Avatar asked Dec 18 '12 15:12

sunleo


People also ask

What is a JRE version?

The Java Runtime Environment, or JRE, is a software layer that runs on top of a computer's operating system software and provides the class libraries and other resources that a specific Java program needs to run. The JRE is one of three interrelated components for developing and running Java programs.

How do I know if Java Runtime Environment is installed?

In the Search bar, type Control Panel. Click Programs. If the Java icon present, then Java is installed. If not, click Programs and Features, and look for installed versions of Java in the J's.


1 Answers

You should try System.out.println(System.getProperty("java.version")); I have successfully tested that it prints the actual version of Java that is used to run the code.

like image 161
dotvav Avatar answered Oct 15 '22 04:10

dotvav