• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Java API to retrieve Websphere product version number?

 
Ranch Hand
Posts: 427
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Does Websphere provide a Java API for retrieving the Websphere product version?

In a perfect world, I�d have a static method that looks like this:

public String getWebsphereProductVersion();


The method would return values such as
"4.0.7"
"5.0.2"
"5.1.1"
"6.0.2.2"

I need a solution for Websphere 4.x, Websphere 5.x, and Websphere 6.x

Thanks in advance.

Sean
 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Look into the versionInfo.sh script thats placed in the <WebSphre_root>/bin directory and that should throw some light on to your issue (content of the script here below -)

###################################################################
binDir=`dirname $0`
. $binDir/setupCmdLine.sh

"$JAVA_HOME/bin/java" \
-Dwas.install.root="$WAS_HOME" \
-Dws.ext.dirs="$WAS_EXT_DIRS" \
-classpath "$WAS_CLASSPATH" com.ibm.ws.bootstrap.WSLauncher \
com.ibm.websphere.product.VersionInfo "$@"
#####################################################################
 
author
Posts: 181
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This information is available using JMX programming. I would download MBeanInspector to see all the available MBeans in WAS:

http://www.alphaworks.ibm.com/tech/mbeaninspector
reply
    Bookmark Topic Watch Topic
  • New Topic