In most epic's the hero has to undergo a journey known as the "hero's journey." Along the hero's journey the hero is faced with challenges that have to be overcome, but the hero does not have to face them alone. Along their journey they meet companions and friends.
In both Hamlet and Star Wars, along the hero's journey, the hero meets friends and companions. Those friends and companions can have great influence over the Hero. Along Anakin's path the Emporer of the Sith turns Anakin down to the dark side. And in Hamlet, Horatio and Hamlet's mother try to convince Hamlet that revenge is not needed.
The hero's journey leads Hamlet down a path of conviction and revenge. As in Star Wars when the hero's journey leads Anakin Skywalker down the path of the Dark Side.
In a way the two epics follow the same path, one that can not be returned from. As in Hamlet, Anakin falls as well, only to be reborn as Darth Vader. Hamlet falls leaving Horatio to tell his story to the rest of the world.
The Hero's Journey is a path that has to be walked and it is shown in both Hamlet and Star Wars.