Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello everyone,
My question is about user.dir system property (TOS v6 Vs TOS v7).
In Talend v6 TOS, System.out.println(System.getProperty("user.dir")) expression returns: C:\Talend
However, in Talend v7 TOS, same expression returns: C:\Talend\TOS_DI-Win32-20190620_1446-V7.2.1\workspace\{project}\poms\jobs\process\{job}\src\main\ext-resources
When jobs are built, System.getProperty("user.dir") returns the same localization where .bat file is, both in v6 and v7.
Concerning the TOS, this difference is a bug or is it normal? This is a little bit disturbing for the use of relative paths, e.g. "./xxx" or "../xxx".
Thanks in advance,
Boulissom
Hi,
Could you please provide the use case where you are using this value in your job?
Warm Regards,
Nikhil Thampi
Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved
Hello,
Thanks for your reply and sorry for the delayed feedback - some problems with my account.
The issue encountered is finally the same that this one encountered by other users (without anwser):
Relative paths can be usefull if you want to be totally agnostic, not depend from the environment where Jobs built will be deployed (e.g. in the case where you would like use a .ini or .properties file).
I know that a workaround exists: use context to set paths. But I don't understand why user.dir system property is not the same anymore for NOT built and built Jobs in Talend v7.
Thanks,
Boulissom
Is there any solution to set user.dir path like was in 6.4 version? We have all project created with path like that ./input and where it was in talend everything is working fine. Now to test anything we need to copy testing file to workspace which is problematic to find at the beggining.
Regrads,
Mateusz