Java is one of the most popular programming languages. I learned Java a few years ago. I learned it in Windows OS. Now I need to install it in Ubuntu. Here are the steps:
1) You need to update Ubuntu Repository. Type this command:
sudo apt-get update
Just wait till your Ubuntu Repository updated.
2) Now it’s time to install Java. If you are developer, you need JDK (Java Development Kit), but if not, you only need JRE (Java Runtime Environment). I will install JDK 6 in my Ubuntu.
for JDK, here is the command:
sudo apt-get install sun-java6-jdk sun-java6-plugin
for JRE, here is the command:
sudo apt-get install sun-java6-jre sun-java6-plugin
3) After that, run command:
sudo update-java-alternatives -s java-6-sun
Then add the line “/usr/lib/jvm/java-6-sun” to the top of /etc/jvm file.
4) Check your Java installation using these commands:
java -version
the output:
java version "1.6.0_03" Java(TM) SE Runtime Environment (build 1.6.0_03-b05) Java HotSpot(TM) Client VM (build 1.6.0_03-b05, mixed mode, sharing)
if you install JDK, check Java compiler using:
javac -version
the output:
javac 1.6.0_03
5) You’re done!
Related posts:








April 18th, 2009 at 1:22 pm
Wow, it’s so easy. Thanks bro!