The bash command "export X=Y" sets the variable X in the shell where it's called, and further, makes it available to all other processes started from that shell. By executing this command in a shell from Java, you're defining the variable in a shell that executes just this one command and then exits. So whereas the command works, it doesn't do anything!
There's no way for a child process to add something to its parent's environment. Why do you want to do this from a Java program?