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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
EricMoss
Contributor
Contributor

TOS: user.dir system property (v6 Vs v7)

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

Labels (4)
3 Replies
Anonymous
Not applicable

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

EricMoss
Contributor
Contributor
Author

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):

https://community.talend.com/t5/Design-and-Development/Setting-the-default-directory-in-TOS-6-4-vs-7...

 

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

UseThat
Contributor
Contributor

@nthampi 

 

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