Michael Birt warned such criminals that they were damaging Island life as he announced the sentence on Maciej Filipczak.
The court also recommended that Filipczak should be deported at the end of his sentence.
It is now up to the Lieut-Governor to decide whether to adopt that recommendation.
The 28-year-old defendant had pleaded guilty to possessing 175 amphetamine tablets and 7.9 gm of amphetamine powder and to supplying a total of 126 amphetamine tablets and 22 gm of amphetamine powder in February and March.
He was arrested after being found urinating in Cattle Street in the early hours of 23 March.
When police searched him and his flat, they found amphetamines and dealing lists.
Before announcing sentence, Mr Birt turned to the defendant and said: ‘If foreign nationals come to Jersey and start supplying drugs, whether class A or class B, we consider that to be highly detrimental to the young people of our community.
Furthermore, in your case, it continued over five weeks, and you are assessed as being at medium risk of reoffending.
‘We have no hesitation in saying that your continued presence in the Island would be detrimental, and we wish it to be clearly understood by foreign nationals who come to the Island that if they deal in drugs they are at a high risk of being deported.’

