ObjectDB ObjectDB

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).

edit
delete
#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
edit
delete
#3

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

edit
delete

Reply

To post on this website please sign in.