Setting up a license key

The open-source Saxon-HE product does not require any license key. For Saxon-PE and Saxon-EE (Java and C/C++), and also for SaxonCS, you need to obtain a license key from Saxonica. You can order a free license key for a 30-day evaluation, or purchase an unrestricted license key, from the Saxonica website.

From Saxon 11, license keys have an expiry date, configured according to the terms under which you purchased the product. If the license has expired, Saxon will continue to run, but with degraded performance. Messages are logged when expiry is imminent.

License files are interchangeable across the Java, .NET, and C/C++ products. License files issued for previous releases continue to function with Saxon 11 and subsequent releases until the date on which their upgrade entitlement ends.

When you order a license key, we will send you an email message containing a link to a location on Saxonica's servers where the license file is available for download. The link is valid for 30 days. When you download the file, you must keep the name saxon-license.lic.

Saxon will search for the license key in the following locations:

  1. If you supply a Saxon configuration file, the location given in the licenseFileLocation attribute of the outermost configuration element in this file.

  2. The location specified using the configuration property LICENSE_FILE_LOCATION.

    When this property is set on the Configuration, Saxon will immediately attempt to load the specified file, avoiding any subsequent attempt to search for it on the classpath and elsewhere. This mechanism is useful in environments that are otherwise difficult to control: for example configuration properties can be specified as attributes to the factory element of Ant's <xslt> task.

  3. For SaxonJ only, the directory containing the executable SaxonJ software, that is saxon-ee-12.#.jar or saxon-pe-12.#.jar. This only works if SaxonJ is able to discover where it was loaded from, which depends on the ClassLoader used to load it; as a result this mechanism fails on some application servers.

  4. For SaxonC only, the directory where the main SaxonC library has been installed.

  5. For SaxonJ only, the directories identified by the environment variable SAXON_HOME and SAXON_HOME/bin.

  6. All directories on the Java class path. When running from the command line, you can set the classpath using the -cp option on the java command, or via the environment variable CLASSPATH. More complex environments might have other ways of building the classpath. In Tomcat, for example, the license file should be treated in the same way as free-standing (unjarred) classes, and placed in the WEB-INF/classes directory.

  7. For SaxonCS only, the directory identified by the environment variable SAXON_LICENSE_DIR.

  8. For SaxonC only, the directory identified by the environment variable SAXONC_HOME.

If you acquire Saxon as a component of an application with which it has been integrated, the application may activate the software automatically using an OEM license key. In this case you do not need to acquire an individual license key of your own. This also applies if you want to run transformations or validate using schemas that a developer has issued in compiled form with an embedded license key: in this case you will need to download the Saxon-EE software, but you do not need to install a separate license key.

Please be aware that the terms and conditions under which license files are issued require you to ensure that it is kept confidential and secure, and is used only on one machine. It must not be copied to other computers, or made available for sharing on a file server.