Creating compiled executables
This recipe shows how we create compiled code from the job we have created. First, we will export the code into a compiled executable, and then we will execute it via the command line.
How to do it...
- Open the folder
chapter11
in the metadata repository. - Right-click on the job
jo_cook_ch10_0010_helloWorld
, and select the option to Export Job. - Click on Browse to navigate to the folder
compiledCode
within the cookbook directory. - Ensure the Export type is Autonomous Job, and tick Extract the zip file.
- In the options tick Shell launcher and Context Scripts, and tick Apply Context to children Jobs.
- Your dialog should look like the one in the next screenshot:
- Click on Finish to compile the job.
- Navigate to the
compiledCode
folder, and you will see a zip file and a directory for the compiled job.Executing the job
- Open a command window within Windows or a shell window in Linux.
- Navigate to the cookbook
compiledCode\jo_cook_ch10_0010_helloWorld
directory, and execute the.bat
...