Sometime we need to add extra parameter environment when running or installing some program. Like I’ve been through here when installing netbeans. It needs java environment variable defined in memory. So the netbean will easily call for java function that located in /usr/lib/java (for example).
But I made some mistake when setting this variable. I put a command like this
The tutorial suggested differently. This is what I should do
I don’t know the different but when typing export command the JAVA_HOME didn’t loose. Even when I restarted the machine. Finally I found the manual for export command in linux.about.com how to erase the environment.
#export -n JAVA_HOME
And it disappeared.