You are not logged in.
Announcement
Unanswered posts
|
Pages: 1

Hi folks,
could you please explain me how to read variables in the OS from a job?
is there a single approach that works for windows and linux (*unix)?
i am using Java in Talend.
thanks,
Nicolas
Last edited by nicolasdiogo (2009-02-09 17:24:52)
Offline

Hi Nicolas,
you could use System.getenv("VARIABLENAME").
Bye
Volker
Offline

Thanks Volker,
since talend has a component for setting variables i was looking for a component to read them as well.
thanks once more,
Nicolas
Offline

Hi Nicolas,
sorry too say that, but I think the component tSetEnv doesn't set any system environment variable. You should add the as parameter in the component tSystem. The documentation on the component list seems to be wrong (or the component?).
It is technical not possible to generally set a system environment variable in java for security reason.
Bye
Volker
Offline

Volker,
thanks for the clarification.
i will double check my jobs and move them to another PC to make sure work as expected.
regards,
Nicolas
Offline

Hi Nicolas,
if you give some information about your problem. Maybe there is another solution.
Bye
Volker
Offline

Volker,
i am using both windows and linux.
so i was loooking for an approach to set the variables in both OS.
Nicolas
Offline

Hi Nicolas,
does setting the variables directly in tSystem help you out?
Bye
Volker
Offline
Pages: 1