Detecting the operating system at run time and dynamically setting the file path
To allow the Job to run on different operating systems, you can set the file path using a context variable as in the following example Job.
This Job is composed of:
- a tJava component to initialize the context variable and detect the operating system,
- a tFixedFlowInput component to generate data,
- a tFileOutputDelimited component to generate a .txt file.
![](/en-US/components/7.3/Subsystems/java-custom-code/Content/Resources/images/dynamically_setting_the_file_path_1.png)
Procedure
Did this page help you?
If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!