Peter Penzov
Peter Penzov

Reputation: 1740

Get Glassfish 4.1.1 from JMX

I wan to get Glassfish version from JMX using Java code. I tried to search in JConsole tool but still I can't find it is there any way to get this data?

Upvotes: 0

Views: 229

Answers (2)

leet java
leet java

Reputation: 304

If you want to get the GlassFish version from code not via JMX there is a Version class in package com.sun.appserv.server.util this has many version related methods; See the source on GitHub

Upvotes: 0

Marcos Zolnowski
Marcos Zolnowski

Reputation: 2797

You could go with serverVersion. But as you can see in the picture, you still get Glassfish V3.1 with Glassfish 4.1. serverVersion screen

Now, ApplicationServerFullVersion will bring better results: GlassFish Server Open Source Edition 4.1 (build 13) ApplicationServerFullVersion screen

Upvotes: 1

Related Questions