Relevant steps:
Go to “Help” -> “Install New Software…”.
In the new dialog, in the “Work with:” pull-down list, select “Indigo – http://download.eclipse.org/releases/indigo”.
(Note: Replace Indigo and the download list with download locations for your eclipse version)
Select the following packages to install:
"Web, XML, Java EE and OSGI Enterprise Development".
"Programming langauges -> Eclipse Java Development Tools"
After installation is complete, if you restart eclipse, you should see an option for java perspective in “window -> open perspective -> ” or “window -> open perspective -> other”
If the above does not work, check the following as well:
Java EE perspective in eclipse