Re: Determining JBoss AS server version by examining install
by Ales Justin
Here's what you can also do to determine the version (the passed in home
parameter points to the JBoss installation director):
protected String getServerVersion(String home) throws Exception {
File file = new File(new File(home, "bin"), "run.jar");
Attributes attributes = new
JarFile(file).getManifest().getMainAttributes();
return
attributes.getValue(Attributes.Name.IMPLEMENTATION_VERSION).split(" ")[0];
}
18 years, 11 months
Re: [jboss-dev] Determining JBoss AS server version by examining install
by Ales Justin
See how it is done in AS:
org.jboss.system.server.profileservice.ServerImpl
/** Package information for org.jboss */
private final Package jbossPackage = Package.getPackage("org.jboss");
log.info("Release ID: " +
jbossPackage.getImplementationTitle() + " " +
jbossPackage.getImplementationVersion());
If this helps.
Rgds, Ales
18 years, 11 months
Determining JBoss AS server version by examining install
by Tim Fox
I need to determine from an ant script whether the JBoss AS version
installed in a particular directory is JBoss AS 4.2.0 or later.
Initially I thought I could just look at the JBOSS_HOME env entry, but
the user might have installed it in a different directory other than the
default jboss-4.2.0.GA directory.
Can anyone think of a good/recommended way to do this? Is there a file
somewhere in the distro I can parse?
18 years, 11 months