public static String getVersion ( ) { if ( version != null ) return version ; try ( InputStream stream = CDK . class . getResourceAsStream ( RESOURCE_LOCATION ) ) { if ( stream == null ) { // load from JAR (as packaged with maven) version = CDK . class . getPackage ( ) . getImplementationVersion ( ) ; } Properties props = new Properties ( ) ; props . load ( stream ) ; version = props . getProperty ( "version" ) ; return version ; } catch ( IOException exception ) { // there is no back up logger . error ( "Error while loading the build.props file: " , exception . getMessage ( ) ) ; logger . debug ( exception ) ; } return null ; }
Returns the version of this CDK library .