public final class License extends Object
DEFAULT_LICENSE_FILES
under the
same directory as the nmdev library jar file, runtime working directory, or classpath; orsetLicenseFile(java.io.File)
to specify the license file; orsetLicenseKey(java.lang.String)
to set the license key.setLicenseFile(java.io.File)
.
Another way to set the license programmatically is to call
setLicenseKey(java.lang.String)
with the key string. Once you got a valid license, you
can copy the license key in the license file. Using setLicenseKey(java.lang.String)
, the
file I/O for loading license file can be avoided.Modifier and Type | Field and Description |
---|---|
static String |
DATE_FORMAT_STRING
Date format for all kinds of dates in a license file.
|
static String[] |
DEFAULT_LICENSE_FILES
Default license file names.
|
static String |
LICENSE_FILE_PROPERTY
The system property term for setting license file.
|
Modifier and Type | Method and Description |
---|---|
static String |
getLicenseKey()
Gets the license key string of the current license.
|
static String |
getLicenseLocation()
Gets the location of the current loaded license.
|
static String |
getValue(String name) |
static String |
getVersion()
Gets the version number.
|
static void |
setLicenseFile(File licenseFile)
Overrides the default license file.
|
static void |
setLicenseKey(String key)
Sets the license key for this invocation.
|
public static final String LICENSE_FILE_PROPERTY
setLicenseFile(java.io.File)
,
license file can be specified by system property using -D option in 'java' command.public static final String[] DEFAULT_LICENSE_FILES
public static final String DATE_FORMAT_STRING
public static void setLicenseFile(File licenseFile)
RuntimeException
.licenseFile
- the license filepublic static void setLicenseKey(String key)
RuntimeException
.key
- the license keypublic static String getVersion()
<major version>.<minor version>.<bugfix version>
public static String getLicenseKey()
setLicenseKey(java.lang.String)
for setting
up license programmatically without file I/O.public static String getLicenseLocation()
Copyright © 2010-2020 NM FinTech Ltd.. All Rights Reserved.