I have never used Ubuntu before. How do I go about setting an environmental variable that points to JDK? I installed it on my Desktop. I typed in "EXPORT JAVA_HOME=~/Desktop/jdk" in the command prompt but it didn't work.
1 Answer
set environment variables as follows
Edit the system Path file /etc/profile
sudo gedit /etc/profile
Add following lines in end
JAVA_HOME=/usr/lib/jvm/jdk1.7.0
PATH=$PATH:$HOME/bin:$JAVA_HOME/bin
export JAVA_HOME
export JRE_HOME
export PATH
for reference http://javaandme.com