Please re-read the post from unSpawn, since it has the answer to your question:
.bashrc ... gets sourced when starting a new shell session
this means that it's not enough to write the export statement into $HOME/.bashrc... it has to be sourced to apply the changes (otherwise it is simply something written in a text file and nothing more). If you want to apply the changes to the current shell just do:
Anyway, what is the aim of this? If you want to provide an installation script, I think it's better to not modify the user's .bashrc without he/she is aware of the change. I personally would prefer the installation script warns me about the changes I must apply (that is it makes notice about a necessary environment variable) then I will apply it at my pleasure, eventually following the advice to write the export statement in my .bashrc. Just my
Finally, following again the answer from unSpawn, you should definitively have a look at the bash man page or at the Bash reference manual
to see how environment variables work and how they are assigned by the login shell when invoked.