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];
}
Show replies by date