I just installed JDK in Ubuntu with sudo apt-get install openjdk-6-jdk
command, after the installation where's the Java bin
directory located? And how can I set the environment path for that directory? I have little experience with Ubuntu, can anyone give some advice or suggest any good website for reference?
You can set your JAVA_HOME in /etc/profile as Petronilla Escarabajo suggests. But the preferred location for JAVA_HOME or any system variable is /etc/environment .
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
Then Log out and Log in ubuntu for setting up the paths...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With