I've been using a linux machine for less than two weeks, so I am extremely new to Linux.
I'd also like to install the Java Developers Kit. How should this be done? Is there an apt-get
command, or should I just click on the download button at Sun's website?
I'm sure there is more than one way to do this, and it probably doesn't matter much, but I was impressed with how smoothly apt-get install
worked when installing PHP and MySQL, so if there is a right way to do this, I'd like to know.
I'm using Ubuntu version 9.04
Yes, definitely it's the suggested way to install JDK on your Linux system (if available).
On Ubuntu:
sudo apt-get install sun-java6-jdk
The Oracle JDK is no longer included in the Ubuntu repos. According to https://stackoverflow.com/a/15543636/192221 , the following ppa can be used:
echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu precise main" | tee -a /etc/apt/sources.list
echo "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu precise main" | tee -a /etc/apt/sources.list
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EEA14886
apt-get update
apt-get install oracle-java7-installer
If you have OpenJDK installed already, you might need to use
update-alternatives --config java
to use the Oracle Java by default.
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