Sunday, March 13, 2011

Java on Ubuntu

As a Java developer like me, it is very common for us to always install Java in our box. But I had this experience in Ubuntu 10.10 that I cannot install Java from the terminal. Ubuntu Software Center offers alternatives like OpenJDK which is very easy to install, but if you're like me who preferred the official JDK (from Sun/Oracle) then you'll probably stressed yourself in finding ways to install the official one and ignore the alternative despite its compatibility and ease during installation.
Trying the following terminal command:
sudo apt-get install sun-java-jdk sun-java-jre sun-java-bin

will just give you a message:
Package sun-java6-jdk is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package sun-java6-jdk has no installation candidate


For an unknown reason, the sun-java-jdk are not yet available in the partner repositories. Because of that, what I did was I simply added the Java ppa (Personal Package Archives) in the repository then updated it. To do this, use the following command:
sudo add-apt-repository ppa:sun-java-community-team/sun-java6
sudo apt-get update

After you update your Ubuntu repositories, you can now proceed with the installation of Java in your box.
Use the following command:
sudo apt-get install sun-java-jdk sun-java-jre sun-java-bin


There you go! You have now JDK on your Ubuntu box, you can now install Java IDE such as Eclipse or Netbeans, or installing nothing if you prefer of not using any IDEs.

Additional note:
If you experience problems during Java installation after you update your repositories, like the error message below:
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

Try first the recommended command by Ubuntu first:
sudo apt-get update --fix-missing

If the problem still didn't fixed, simply modify your Software Sources. See the image below:


*Originally, Software Sources can be found in System>Administration>Software Sources, but in Ubuntu 10.04 and 10.10, it was removed on its default location. To add this, just right-click on System menu from the panel then select "Edit Menus". Select "Administration" then check Software Sources. See example below:


That's all! Enjoy! :D

Saturday, March 5, 2011

Unity Desktop - Concepts to Reality

Unity is the greatest change to the Ubuntu desktop till date. You will  able to get your hands on a completely new form of desktop, replete with features competing head on with other major operating systems. The UI is built upon Ubuntu’s netbook interface called UNE, and is quite similar to Gnome Shell but build on Compiz. However Unity, unlike Gnome3 and UNE, will be using the Compiz window manager instead of Mutter(which many users found to be slow and buggy). Also, many new and useful indicator applets are being developed which will help users add more functionality to a fresh installation. With Unity, Ubuntu 11.04 takes a completely new direction that will surely grab attention of desktop and netbook users alike.
Nautilus elementary will not be the default file browser. It was later rejected on the grounds that “patches were considered hacks”.
 (source: http://ranjith.zfs.in/ubuntu-11-04-features-confirmed-libreoffice-firefox-banshee-and-unity/)

This will be the most significant change ever for Ubuntu.
I'm looking forward to this release... :D