0

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?

Peter Penzov
  • 1,126
  • 134
  • 430
  • 808

2 Answers2

1

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

Marcos Zolnowski
  • 2,751
  • 1
  • 24
  • 29
0

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

leet java
  • 304
  • 1
  • 3