If Joseph knew that his brothers would get envious, why did he tell them about his dream?
Joseph’s dreams were no ordinary dreams, rather he understood that where in fact a prophecy of sorts. That being the case he was obligated to share his dream and it’s message with his brothers, even if it would have undesirable results. Ultimately it was his telling of the dream that led to them having food during the years of famine. In addition while it is certainly a fair assumption, Joseph may have in fact not known that they would be envious of his dreams.