> James Carman wrote:

> We use a method like this:
>
> public static String versionOf(Class c) {
>   final String version = c.getPackage().getImplementationVersion();
>   return StringUtils.isEmpty(version) ? "n/a" : version;
> }
>
> So, if you want to know what version of Hibernate you're using, you'd do:
>
> versionOf(org.hibernate.Session.class);

Implementation note: getPackage() must be checked against null.

Jochen


-- 
I Am What I Am And That's All What I Yam (Popeye)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org

Reply via email to