Saturday 13 August 2011

Installing Java in Ubutnu

Installing Java in Ubuntu made easy :)
1. from synaptic select
sun-java6-jdk
and apply. which will automatically select other required package like:
sun-java6-jre
sun-java6-bin

once sun-java6-jdk has been installed you don’t need to worry about a thing to install

2. you have to configure default java to be sun’s
from your terminal type “sudo update-alternatives –config java”
you will get number of alternatives as shown below.. select “2″

Selection Path Priority Status
————————————————————
0 /usr/lib/jvm/java-6-openjdk/jre/bin/java 1061 auto mode
1 /usr/lib/jvm/java-6-openjdk/jre/bin/java 1061manual mode
* 2 /usr/lib/jvm/java-6-sun/jre/bin/java 63 manual mode

3. you are done.. :)
you can now write your java program in any editor or IDE and then execute your java program
as
javac program.java (which compiles your java program)
java program (which will execute your java program )

HAPPY PROGRAMMING!
JAVA IS FUN

No comments:

Post a Comment