Is joining the air force a good way to become an airline pilot?
Honestly, every U.S. Air Force pilot I know, who wanted to retire to the airlines, got hired on with no problems.  The ex-Air Force pilots I know have all gotten immediately put into the big planes: A380, 747, 767, 787, etc right from the start.  This is because the airlines know that an ex-military pilot has had some of the best training and experience in high pressure situations. 

That being said, in the USA it is very hard to become an Air Force pilot.  You have to contract with the Air Force before they even let you know if you can go to pilot training.  That means, if you don't make the cutoff for pilot training, you have to spend at least 4 years in the Air Force.  If you do make it through Air Force pilot training you have to contract for 10 years after you finish flight school, which means about 12 years from your date of commissioning.  This will take a good 16+ years out of your life, including the time spent in college.  However, you will progress from your first flight all the way to potentially flying F-22s in under two years - a rate of progressing you won't see anywhere else.

Bottom line is, if you don't want to join the military then you shouldn't.  By joining the military you are expected to give your life for people you may not know, or even care about.  That aside, there's no point in spending a minimum of 16 years doing something you don't like, or fighting for a cause you don't support just to become an airline pilot.  If you can find a good airline cadet program, or scholarship, you can become a great airline pilot, it will just take a longer time to progress from one aircraft to another.

Just a little tangent.  That being said, I'm currently an AFROTC cadet, and I had no military background.  I love AFROTC, the US Air Force, and the USA.  I'm currently applying for a pilot slot in the U.S. Air Force, but if I don't make it I would be vary happy taking other jobs, too.  The key is to have small, achievable goals that you can take one step at a time.  

I wish you the best of luck.