Ubuntu 10.04 comes with openJDK which you can install using synaptic manager easily. But to install sun JDK you need to add a repository:
1- Go to System > Administration > Synaptic Package Manager > Settings > Repositories > Other Software and enable the partner repository.
Now you can either search for sun-java6-jre, sun-java6-plugin, sun-java6-jdk using Synaptic or:
2- sudo apt-get install sun-java6-jdk
After downloading it will ask you to agree to a licence agreement. Hit “Enter” to agree.
Note: If “enter” doesn’t work, hit “Tab” first. Guess what? It happened with me and drived me crazy for a while.
3- Hit “enter” again to agree again to the dialog.
4- It’s installed now. To check: $ java -version
احمد صبحى قال,
اغسطس 29, 2010 في 1:26 ص
what is the advantage of sun JDK over OpenJDK ??
marwayusuf قال,
اغسطس 29, 2010 في 1:35 ص
Actually I didn’t search for that for now. I just need java quickly for my work, and I need a specific version so I prefered to be in safe side
Anyway here’s a discussion about that issue – which I didn’t read yet.