John Malkovich was sexually harassed by one of his professors while studying theatre at university.

The 66-year-old, who attended Eastern Illinois University and Illinois State University, recently played a character loosely based on disgraced movie mogul and convicted sex offender Harvey Weinstein in David Mamet's play Bitter Wheat.

And in an interview with British newspaper The Guardian, Malkovich shared that he was a victim of harassment when a teenage student.

"When I was young, I had a professor in the theatre department who made some advances that were unwanted," the star explained. "I was 19, he was in his 50s. I just said it wasn't my thing, sorry. It was someone I was fond of and I liked. So life went on. I did transfer schools, but not really because of that."

However, Malkovich regards what women allegedly suffered at the hands of Weinstein, who has been accused of blacklisting actresses who turned down his advances, as much worse than his experiences.

"The Weinstein situation is very different," Malkovich added. "It was transactional. It's terrible for women, but it's horrific also just for the idea of work."

The actor was still surprised that Weinstein was given a 23-year sentence for committing a criminal sexual act and third-degree rape - as all his friends assumed he would be let off.

"I was shocked he even got a sentence," he revealed. "I don't know anybody who believed he would go to jail."