Since eclipse3.4 and the p2 mechanism , you can use org.eclipse.osgi.service.datalocation.Locationthat represents the url.
This interface includes ** ECLIPSE_HOME_FILTER**, a constant that defines the filter string for receiving a service that indicates the location of the home eclipse (i.e., " eclipse.home.location".)
eclipse3.3 "eclipse.home.location", :
System.getProperty("eclipse.home.location");