Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
April 13–15 - Dare to Unleash a New Professional You at Qlik Connect 2026: Register Now!
cancel
Showing results for 
Search instead for 
Did you mean: 
_AnonymousUser
Specialist III
Specialist III

Setting the context variable value from java code?

Hi: gurus, is it possible to set the context variable value from the Java code.
E.g set a new context value e.g foo = system.getProperty("user.dir")
I tried it but it looks like it doesn't work.
If this is not possible what is the best way to define some global variables with system specific info e.g directory path etc.
Thanks,
RJ.
Labels (3)
3 Replies
Anonymous
Not applicable

Hi Rashid,
I am not a Talend guru but I will try to help you 🙂
yes, you can set the value of the context variable inside a javacode. Try it using tJava.
Please see screenshots below:
_AnonymousUser
Specialist III
Specialist III
Author

Thanks for the tip lovely.
Regards,
RJ.
Anonymous
Not applicable

No problem. Anytime 0683p000009MACn.png