Is there an API to get the current version of ObjectDB that's being used?

#1

Is there an API to get the current version of ObjectDB that's being used? This would be very handy to have, because it is somewhat difficult to know what version of the ObjectDB you are currently using since the objectdb.jar filename remains the same for all versions (which is not a bad thing by itself).

Shridhar Bharthulwar
#2

It is not JPA portable, but you should be able to get the version with the following code:

public static void main(String[] args)
{
    com.objectdb.jdo.PMF pmf = new com.objectdb.jdo.PMF();
    String version = pmf.getProperties().getProperty("VersionNumber");
    pmf.close();
       
    System.out.println(version);
}
ObjectDB Support
ObjectDB - Fast Object Database for Java (JPA/JDO)
#3

I tried it, and this works...thank you very much for the prompt response!

Shridhar Bharthulwar

Post Reply

To post a reply and/or subscribe to update notifications - please login