Request and Install License
AlchemyJ Enterprise Edition requires an AlchemyJ license key for API generation. APIs generated by the Enterprise Edition also need an AlchemyJ license key to run.
In the AlchemyJ Enterprise Edition package folder, there is Get_License_Required_Info_Windows.bat for Windows machine and Get_License_Required_Info_Linux.sh for Linux machine.
For AlchemyJ Studio, execute Get_License_Required_Info_Windows.bat on the local machine. For AlchemyJ Server Runtime, copy the script to the server and execute the script in the server platform.
Both scripts will generate a ComputerInfo.txt file. Thereafter, please send the file to firstname.lastname@example.org to request for an AlchemyJ license.
Setting up the license file for AlchemyJ Studio
You would only need to use one of these three options mentioned below to set up the license file for AlchemyJ Studio. By using the default license key file location, the advantage is that you would not need to make any additional configurations. The next recommended option would be to use environment variable to set up the license file. If the license is specified using multiple ways, the Environment Variable will be the top priority and the license key file location will be the second priority.
Using Default License Key File Location
After getting the license file, rename it to AlchemyJ.lic and put it in the same directory with the AlchemyJ Enterprise Edition folder. AlchemyJ workbook will recognize this path as the default license file path. By setting up the default license file path, there is no need to specify the environment variable or license key file path in AlchemyJ workbook.
Using License Key File Location Directly
To specify the path of the license file directly, you can specify the file path in the AlchemyJ Studio Settings popup window.
Using Environment Variable
To create an environment variable in the operating system, its value is the file path of the license file. To specify the variable, you can go to the AlchemyJ ribbon, click on Settings and select the "License" tab in the popup window.
Setting up the license file for Server Runtime (for REST API)
Pre-setup in AlchemyJ Studio
Configuration in the external configuration file
If you are going to just run the REST API with the embedded tomcat/jetty, there is no need to do the steps below. You would only do the change as mentioned in the steps below if you want to run the generated API in some other server and that server does not use the same license key location.
Go to AlchemyJ ribbon, run Generate API first, you will get an application config file in the output folder and locate \src\main\resources\application.yml. Make a copy of this file and put it in the folder as specified in the application configuration file location in the REST API worksheet.
Open this application.yml file with a text editor or a yml editor of your choice.
If it is going to use environment variable, update the variable name in alchemyj\license-env-variable-name. If it is going to specify a static path, update the value in alchemyj\ license-file-location instead.
If the license is specified using multiple ways, the Environment Variable will be the top priority and the license key file location will be the second priority.
Setting up the license file for Server Runtime (for Java API)
Use Java method WorkbookExecutorInitPropertyHolder.setLicenseFileLocation to setup the path of the license file. You can find out more details in Integrate Java API in a Java project.