Found that it's a common problem that the 'Home' and 'End' keys don't function as-expected on MacOS. Found this fix, posted on LifeHacker:
The issue is that this fix only works on native/Cocoa apps and doesn't work on many of the other apps like ThunderBird and Eclipse. Will be thankful for any help, regarding this.
PS: I frequently switch between the beginning and end of the line and this has been so annoying lately that I switch to a vim window to edit code and use Eclipse only for debugging it.