Jaycee Chan
Actor Jaycee Chan attends a trial at a court in Beijing January 9, 2015Reuters

Famous Hollywood actor Jackie Chan's son, Jaycee Chan, has been sentenced to six months in jail along with a fine of 2,000 yuan or $320 for a drug offence.

The Dongcheng District People's Court announced the news on its microblogging account.

A major crackdown on illegal drugs in the Chinese capital of Beijing revealed that the 32-year-old man was guilty of providing a venue for drug users, according to Associated Press, . Jaycee reportedly pleaded guilty in the Beijing court to "sheltering others to use drugs," BBC reported.

When police raided his home in August, they had found more than 100gm of marijuana. Jaycee was suspected of using drugs at a foot massage parlour in Beijing on 14 August, 2014. He faced up to three years in jail, but was sentenced to only six months.

Jaycee had been detained along with a Taiwanese movie star named Ko Cheng-tung. The trial was shown live on the official Sina Weibo feed of Dongcheng People's Court.

Last year, the Chinese government imposed a morality code on celebrities and decided to crack the whip on those who take drugs or visit prostitutes.

"I have violated the law and I should be punished," Jaycee said during the sentencing, Hollywood Reporter reported.

"After I return to the society, I will definitely not make a mistake again because I have made my family and friends disappointed for one more time. I have gotten the punished I deserve, but it doesn't mean I have been forgiven. I hope I can use my actions in the future to get the forgiveness and to pass positive energy."

The cout said that it showed lineancy towards Jaycee and sentenced him less jail time because the celebrity confessed on his own. Last summer, Beijing police had arrested as many as 7,800 people over illegal drug-use. Actor Gao Hu was also one of the arrested offenders.

The trial had generated massive media interest, from China and abroad, but only a few were allowed to attend the trial.