Yes, "Stars" explains a lot. Obedience to the law was Javert's religion. I also think that, because he was born in prison and no one gave him a break (like the priest did Valjean), he resented the fact that Valjean had broken his parole and thrived nonetheless. Every time I see it, I get more out of it. "Stars" really sank in this last time.