You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@openjpa.apache.org by C N Davies <cn...@cndavies.com> on 2010/03/06 06:02:41 UTC

Getting version data

Hi,

 

I need to report the version of OpenJPA that is being used in software, it's
very useful when supporting my products.  I can't seem to find any function
that will return the version of the implementation. Something like 

 

org.apache.openja.Version.getVersion()

org.apache.openja.Version.getPatchVersion()

 

Something like that.  Is there any way to return this info?

 

Thanks

 

Chris

 

 

 


Re: Getting version data

Posted by Pinaki Poddar <pp...@apache.org>.
You can also do
$ java -jar /path/to/openjpa-jar

that prints the version info on console

-----
Pinaki 
-- 
View this message in context: http://n2.nabble.com/Getting-version-data-tp4685089p4754584.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.

Re: Getting version data

Posted by Dinkar Rao <di...@gmail.com>.
This is from org.apache.openjpa.conf.OpenJPAVersion:

public static void main(String [] args) {
        System.out.println(new OpenJPAVersion().toString());
}

If you want just the version numbers, you can access these public
static fields of the OpenJPAVersion class:

    public static final String VERSION_NUMBER;
    public static final String VERSION_ID;
    public static final String VENDOR_NAME = "OpenJPA";
    public static final int MAJOR_RELEASE;
    public static final int MINOR_RELEASE;
    public static final int PATCH_RELEASE;
    public static final String RELEASE_STATUS;
    public static final String REVISION_NUMBER;

Thanks,
Dinkar

On Fri, Mar 5, 2010 at 9:02 PM, C N Davies <cn...@cndavies.com> wrote:
> Hi,
>
>
>
> I need to report the version of OpenJPA that is being used in software, it's
> very useful when supporting my products.  I can't seem to find any function
> that will return the version of the implementation. Something like
>
>
>
> org.apache.openja.Version.getVersion()
>
> org.apache.openja.Version.getPatchVersion()
>
>
>
> Something like that.  Is there any way to return this info?
>
>
>
> Thanks
>
>
>
> Chris
>
>
>
>
>
>
>
>