Reputation: 1740
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
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
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.
Now, ApplicationServerFullVersion
will bring better results: GlassFish Server Open Source Edition 4.1 (build 13)
Upvotes: 1