Do smoke detectors have to be hard wired in New Jersey?
According to the New Jersey Department of Community Affairs, New Jersey has adopted the 2009 version of International Residential Code (at the time of writing). The 2009 IRC has this to say...

International Residential Code 2009
Chapter 3 - Building and Planning
Section R314 - Smoke Alarms
R314.4 Power source. Smoke alarms shall receive their primary power from the building wiring when such wiring is served from a commercial source, and when primary power is interrupted, shall receive power from a battery. Wiring shall be permanent and without a disconnecting switch other than those required for overcurrent protection. Smoke alarms shall be interconnected.
Exceptions:
1. Smoke alarms shall be permitted to be battery operated when installed in buildings without commercial power.
2. Interconnection and hard-wiring of smoke alarms in existing areas shall not be required where the alterations or repairs do not result in the removal of interior wall or ceiling finishes exposing the structure, unless there is an attic, crawl space or basement available which could provide access for hard wiring and interconnection without the removal of interior finishes.

Which means that not only do the smoke alarms have to be hardwired, they also have to have a backup battery and be interconnected. Unless of course you are generating your own power, or you're retrofitting a home and hardwiring is impracticable.