Israel cannot eradicate Hamas. In fact every Palestinian it kills now in Gaza is a justification for the existence of Hamas and will drive more Palestinians to support Hamas.
If Israel wants to be seen by the Palestinians as a reliable partner that is prepared to let them live and prosper it should behave as such. It should stop stealing Palestinian houses and land. It should stop suffocation the Palestinian economy and it should take a murdered Palestinian just as serious as a murdered Jew.
Just as the English in Northern Ireland they will still have to suffer terrorism for a while. But that will gradually decrease and in the end stop when it follows an appropriate policy.
Problem is that Israel is in the same position as the whites in the US in the 19th century when they largely exterminated the Indians. They too have a large lobby that is growing rich by stealing land. They too have politicians who know that there is a group against which they can safely indulge in hate mongering. And they too are largely left off the hook by the world public opinion.
But given Israel's geographical position among a sea of Arabs it is a dangerous strategy that well may go wrong in the long term.