If you don't use the 'rbac' security model for the server, then you could also use the JMX to obtain it from inside the server like in a following example:
import javax.management.*;
private String getVersion() throws Exception {
ObjectName rootNameObjectName = new ObjectName("jboss.as:management-root=server");
for (MBeanServer server : MBeanServerFactory.findMBeanServer(null)) {
if (server.isRegistered(rootNameObjectName)) {
return (String)server.getAttribute(rootNameObjectName, "product-version");
}
}
return null;
}
Thanks,
Alexey
четверг, 22 июня 2023 г. в 10:57:12 UTC+3, Rainer Hochreiter: