How do I programmatically obtain the version in JBoss AS 5.1?

后端 未结 2 1442
走了就别回头了
走了就别回头了 2020-12-21 09:46

Does anyone know how to programmatically obtain the server version number under JBossAS 5.1?

JBossAS 4.2 had org.jboss.Version, with getMajor()

2条回答
  •  一整个雨季
    2020-12-21 10:20

    In the end I chose to decompile the Version class from JBoss 4.2 to see what it was doing, and see if the result could be retrofitted into JBoss 5. The end result was to load the resource /org/jboss/version.properties into a Properties object, and then read out the version.major and version.minor properties from that. Beats me why they couldn't just leave the Version class in there, but there you go.

提交回复
热议问题