How to use the license file

edtFTPj/PRO uses a license key to control access to the key classes. All key classes check that a valid license is available, otherwise an exception is thrown.

The license is supplied as either two strings (an owner string and license key), or as a license.jar file (for trial editions and for customers prior to 2.0.1).

The license is set via the setLicenseDetails() method in the com.enterprisedt.util.license.License class. This method should be called prior to using the API in your application. Its use is shown below:

License.setLicenseDetails("myownerstring","mylicensekey");

If a license.jar is being used (e.g. for the trial edition), it must be in the CLASSPATH of the application using edtFTPj/PRO. The trial version includes a license.jar file with an expiry date at least 30 days in the future.

When you purchase the product, you will receive a permanent license consisting of the owner string and the license key. Use License.setLicenseDetails("myownerstring", "mylicensekey") to apply this license. Once this is done the trial license.jar is no longer required.

If you prefer to continue using the license.jar format, you can edit it as follows:

  1. Rename license.jar to license.jar.zip
  2. Open license.jar.zip using a tool such as 7-zip that allows you to edit files within zip files.
  3. Open edtlicense.properties for editing.
  4. Replace the license.owner value with your own "myownerstring", so you have "license.owner=myownerstring"
  5. Replace the license.key value with your own "mylicensekey".
  6. Close the zip file and rename back to license.jar.

You now should have a license.jar file containing your own license details which can be used instead of the trial license.jar.

If you use a trial license.jar after its expiry date, an exception will be thrown indicating that the license has expired.