Making eclipse Kepler and Luna work on Ubuntu

This is a «note to self and to anyone that could need it» post. I’ve had troubles with Eclipse with some Ubuntu installations for some time. I even have had switched to other IDEs, but now I «needed» some plugins that exists for eclipse, so I decided to try to make it work. The problem has been that it either just hangs (OpenJDK 7) or crashes (Oracle JDK 7) after 4 seconds.