I'd do 287 around Newark to 87N to Newburg, then 84E to 90E (Ma. Pike) to 495 to Salisbury then 95N to 295 at Portland and back to 95 outside Augusta. In Bangor take 395 to 1A to 3 into Bar Harbor. Nice rest area is #1 on 84 just before Danbury Ct. You'll also have one right after you get on 90 outside Sturbridge Ma.
Not too sure about the best route from Bangor to Bar Harbor, been a while so the best route may vary.
You should tell us where is NJ you are, I'd try hard to avoid 287 and the Danbury and Hartford areas at rush hour.
By the way, there is a Routes and Roads, or vise versa, here for this type of question.