Licensed dealers in NJ are exempt from N.J.S.2C:39-5a
ETA: Here's the law if you want to reference it:
2C:39-5. Unlawful possession of weapons.
a. Machine guns. Any person who knowingly has in his possession a machine gun or any instrument or device adaptable for use as a machine gun, without being licensed to do so as provided in N.J.S.2C:58-5, is guilty of a crime of the second degree.
2C:39-6 Exemptions.
b. Subsections a., b. and c. of N.J.S.2C:39-5 do not apply to:
(1) A law enforcement officer employed by a governmental agency outside of the State of New Jersey while actually engaged in the officer's official duties, provided, however, that the officer has first notified the superintendent or the chief law enforcement officer of the municipality or the prosecutor of the county in which the officer is engaged; or
(2) A licensed dealer in firearms and the dealer's registered employees during the course of their normal business while traveling to and from their place of business and other places for the purpose of demonstration, exhibition or delivery in connection with a sale, provided, however, that the weapon is carried in the manner specified in subsection g. of this section.