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: 
Anonymous
Not applicable

tSetEnv : my environment variable is null

Hello,
I want to use the tSetEnv component to add environment variable values to my system but I get null values.
In the tSetEnv, I define a variable called test with the value "C:/test"
I test the integration of this variable with a tJava component connected to the tSetEnv component by onComponentOk.
The Java code is:
System.out.println((System.getenv("test"));

I get a null value..
Any help would be greatly appreciated!
Thanks!
Labels (3)
6 Replies
Anonymous
Not applicable
Author

Hi,
try with this :
System.out.println(System.getProperty("test"));

bye
Anonymous
Not applicable
Author

Thanks for the answer. It returns me the value but this one seems not to be integrated in my process..
I'm under Windows and trying to industrialize the use of the execution af an OCR process through tesseract.
Here is my test job:
tSetEnv---->tSystem

I put an environment variable named TESSDATA_PREFIX with the value "C:/tesseract-2.04/"
It's the path of the tesseract folder
Then, in the tSystem, I put:
"tesseract C:/tests/OCR/test.tif C:/testOCR -l fra"

But i get the following message:
Unable to load unicharset file ./tessdata/fra.unicharset

It means that it didn't take into account the TESSDATA_PREFIX env variable.
It it had been the case, it would have searched the file into /tessdata/fra.unicharset
Does tSetEnv integrate environment variables in the machine system or is it internal to the software?
Any idea?
Anonymous
Not applicable
Author

any idea for this problem?
Anonymous
Not applicable
Author

Faced same problem.
Anonymous
Not applicable
Author

me too....
Anonymous
Not applicable
Author

Hi FabriceS,
Would you mind uploading your component tSetEnv setting screenshot into forum? More information will be helpful for us to address your issue.

Best regards
Sabrina