Try this out:
System.out.println("Here's the server version: " + org.jboss.Version.getInstance().toString());
Unfortunately i don't have access for Jboss library at run time. is there any XML i can parse and get the JBoss version..
Also i have another question. Is there any configuration file in Jboss directory i cane get the webserver hostname and port?
is there any XML i can parse and get the JBoss version
You can read the "version.properties" file present in jboss-system.jar file, which you can find in %JBOSS_HOME%/lib directory.
I am using 4.0.3 SP1. I have not seen version.properties file inside the Jboss-System.jar file. Could you please guide me in which file i can get the answer.
Thanks for the help...