-
1. Re: Gettign JBoss Version
falk May 23, 2002 7:58 AM (in response to alepape)During startup of the server, in the main-file:
public Main(String confName, String patchDir)
{
Package mainPkg = Package.getPackage("org.jboss");
System.out.println("JBoss release: "+mainPkg.getImplementationTitle());
System.out.println("JBoss version: "+mainPkg.getImplementationVersion());
...
Maybe this would help you!
Falk -
2. Re: Gettign JBoss Version
alepape May 23, 2002 9:24 AM (in response to alepape)thanks, it DOES help me !!
-
3. Re: Gettign JBoss Version
nick.mills Jan 28, 2003 11:20 PM (in response to alepape)from at least as early as 3.0.4 you can just do
java -jar run.jar --version
...from the jboss bin directory and it spits out the version for you :-) -
4. Re: Gettign JBoss Version
minamoto Jan 29, 2003 2:37 AM (in response to alepape)Hi,
My ROOT.war has next index.jsp, which doesn't work for 2.x though.
<%@page import="javax.management.*"%>
Welcome to JBoss
<%!
private MBeanServer getMBeanServer() {
java.util.List list = MBeanServerFactory.findMBeanServer(null);
return (MBeanServer) list.iterator().next();
}
private String getJBossVersion() throws Exception {
ObjectName mbean = new ObjectName("jboss.system:type=Server");
return (String) getMBeanServer().getAttribute(mbean, "VersionName");
}
%>
Your JBoss version is <%=getJBossVersion()%>
JMX console
Miki