Let me guess: you are running your program from the IDE. The environment an IDE provides to your program is totally unrelated to the environment where you export your variable. Suggestion: run your program from the command line at the terminal in which you did export
. You shall see your variable all right.
Then search your IDE for a way to specify an environment for a target program, and set it there.
Optionally, add the export line to your shell's startup script.