Plain Java API: Is there a method to expose the version ?
I have a stand-alone application that uses the Plain Java API. I would like to include details that I can expose at run-time when the application starts or a separate on-demand run. To this end I have created a VersionInfo class which my ant build fills in certain tokens with information I can determine by running a script. For example, to find the DB2 client version:
java -cp lib/db2jcc.jar com.ibm.db2.jcc.DB2Jcc -version
IBM DB2 JDBC Universal Driver Architecture 3.64.106
I found
between TeamPlatform.startup() and TeamPlatform.shutdown() doesn't do much
So: is there some class/method that would give an understandable version of the running or built
against client libraries ?
Chopping the build string off of com.ibm.team.workitem.client is ambiguous at best....
java -cp lib/db2jcc.jar com.ibm.db2.jcc.DB2Jcc -version
IBM DB2 JDBC Universal Driver Architecture 3.64.106
I found
com.ibm.team.repository.common.TeamRepositoryExceptionwhich has a getClientVersion() method but trying to instantiate one of these sandwiched
between TeamPlatform.startup() and TeamPlatform.shutdown() doesn't do much
So: is there some class/method that would give an understandable version of the running or built
against client libraries ?
Chopping the build string off of com.ibm.team.workitem.client is ambiguous at best....
3 answers
If you are developing a standalone Java application and want to show the version information on the splash screen or when accepting the -version command line parameter, you need to implement it yourself (write your own getVersion() function). You will need to hardcode the version in the code or read it from some environment variable or configuration files.
The TeamRepositoryException class is definitely not the right choice. If you want to get the version of the Jazz server, consider these.
The TeamRepositoryException class is definitely not the right choice. If you want to get the version of the Jazz server, consider these.
com.ibm.team.repository.common.Version
com.ibm.team.repository.client.util.RepositoryUtil.getRepositoryVersion
com.ibm.team.repository.client.util.RepositoryUtil.getRepositoryBuildId
Comments
Kevin,
will the article 361 on Share and Manage Documents through the Web UI do the job?
If this is helpful, please accept the answer.
- Arne
will the article 361 on Share and Manage Documents through the Web UI do the job?
If this is helpful, please accept the answer.
- Arne
I was not able to find the code that prints the version of the Plain Java Client Libraries.