Still, New Jersey counts on the casinos for about $300 million in tax revenue. Recognizing Atlantic City’s importance, Mr. Christie adopted in 2010 a five-year plan to save it, creating a tourism district and a $30 million marketing plan. When investors threatened not to build Revel, the first new casino since 2003, the governor offered $261 million in tax incentives to prop it up.

With Revel now in bankruptcy, the focus is on the new gambling options to save Atlantic City.

Mr. Christie’s budget counts on taking in $180 million in tax revenue from Internet gambling next year. Supporters estimate that New Jersey’s casinos and racetracks would take in more than $1 billion annually.

Internet gambling will route through servers in the casinos and be available only to people using the Web inside New Jersey. The casinos hope to be able to connect with new players and lure them with vouchers for the free rooms and other bonuses they now offer the highest rollers.

Following a 2011 federal court decision saying that online gambling was not illegal, at least seven states have moved to enact it. Sports betting, too, would be based at New Jersey’s casinos, and at the racetracks, which have argued that they would go out of business without it, taking at least 7,000 jobs and $110 million in tax revenue. The legal hurdles to sports betting, though, are more significant.

“That’s the Big Kahuna,” said State Senator Raymond J. Lesniak, a Democrat who has been the chief proponent for both online and sports betting.

The effort to legalize sports betting has been closely watched around the country. New Jersey voters overwhelmingly approved a ballot initiative for sports betting in 2009, which Mr. Christie signed into law. The federal government, joined by professional and collegiate sports leagues, sued to block it.

The judge hearing the case has said he will deliver an opinion this week, but both sides expect it to be appealed to the United States Supreme Court regardless of the outcome. If New Jersey is successful in overturning the ban on sports betting, other states are expected to push for it.