<?xml version="1.0" encoding="iso-8859-1"?>
<?xml-stylesheet href="../../make-menu.xsl" type="text/xsl"?><html>
   <head>
      <this-is section="about" page="installationjava" subpage="licensekey"/>
      <!--
           Generated at 2011-12-09T20:47:22.916Z--><title>Saxonica: XSLT and XQuery Processing: Obtaining a license key</title>
      <meta name="coverage" content="Worldwide"/>
      <meta name="copyright" content="Copyright Saxonica Ltd"/>
      <meta name="title"
            content="Saxonica: XSLT and XQuery Processing: Obtaining a license key"/>
      <meta name="robots" content="noindex,nofollow"/>
      <link rel="stylesheet" href="../../saxondocs.css" type="text/css"/>
   </head>
   <body class="main">
      <h1>Obtaining a license key</h1>
      <p>The open-source Saxon-HE product does not require any license key. For Saxon-PE and Saxon-EE, however,
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 <a href="http://www.saxonica.com/" class="bodylink">Saxonica</a>
web site.</p>
      <p>Since Saxon 9.2, newly issued license keys are compatible across the Java and .NET platforms. The older
.NET license keys (named <code>saxon-license.xml</code>) are no longer accepted.</p>
      <p>The license key will arrive in the form of a file named <code>saxon-license.lic</code> attached
to an email message. Saxon will search for the license key in the following locations:</p>
      <ol>
         <li content="para">
            <p>The location specified using the configuration property
               <a class="bodylink" href="../../javadoc/net/sf/saxon/lib/FeatureKeys.html"><code>FeatureKeys.LICENSE_FILE_LOCATION</code></a>, as described below.</p>
         </li>
         <li content="para">
            <p>The directory containing the executable Saxon software, that is <code>saxon9ee.jar</code> or <code>saxon9pe.jar</code>
    on the
    Java platform, and <code>saxon9pe.dll</code> or <code>saxon9ee.dll</code> on the .NET platform. (On .NET, remember that the software may have been
  moved to the Global Assembly Cache.).</p>
         </li>
         <li content="para">
            <p>On the Java platform only, the directories identified by the environment variable 
                <code>SAXON_HOME</code> and <code>SAXON_HOME/bin</code>.</p>
         </li>
         <li content="para">
            <p>On the .NET platform only, the installation directory - that is, the directory chosen
                for installing the software when the installation wizard was run. This directory is identified in the
            Windows registry.</p>
         </li>
         <li content="para">
            <p>All directories on the Java class path. When running from the command line, you can set the classpath
                using the <code>-cp</code> option on the <code>java</code> command, or via the environment variable
                <code>CLASSPATH</code>. 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 <code>WEB-INF/classes</code> directory.</p>
         </li>
      </ol>
      <p>It is also possible to force Saxon to read the license file from a specific location by setting the Configuration property
            <code>FeatureKeys.LICENSE_FILE_LOCATION</code> (a constant representing the string <code>"http://saxon.sf.net/feature/licenseFileLocation"</code>).
            When this property is set, the <code>Configuration</code> 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 <code>factory</code> element of Ant's <code>&lt;xslt&gt;</code> task.</p>
      <p>On the Java platform it is generally simplest to copy the file to the directory in which <code>saxon9ee.jar</code> is installed.
On .NET it is generally simplest to copy the file to the directory in which <code>saxon9ee.dll</code> is installed, and
then set the environment variable <code>SAXON_HOME</code> to point to this location.</p>
      <p>If you acquire Saxon-PE or Saxon-EE 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.</p>
      <p><i>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.</i></p>
      <table width="100%">
         <tr>
            <td>
               <p align="right"><a class="nav" href="licensefaq.xml">Next</a></p>
            </td>
         </tr>
      </table>
   </body>
</html>