While trying to install Solr in Centos, I noticed that Java 1.5 is required, however Java 1.4 is installed by default.
Now, in order not to have Tomcat start the old Java version, we need to uninstall it using a simple yum line:
sudo yum remove java
Next on the list is to install the new Java versions. Good thing it is included :)