Does XL have business class? On most airlines if you're flying business check-in is faster and you can get through security faster.
Even with J, check-in officially closes 60 minutes before departure. That's 10:55pm. Leaving Brooklyn at 10:30 is super risky.
Now if there's no traffic to JFK, you have no luggage and you do online check-in (which should allow you to bypass the check-in counter limit), and you manage to skip the security lines and run to the gate, it is technically doable (with few precious minutes to spare).