If you are able to train your dog not to do something, you can train them to stop barking. With my dogs, the "no" command works. But, they must be used to "no" and understand that when you say "no" it means, stop what you're doing...I don't like it.
You could also firmly say no, and give them something to chew on...or do something else to distract them. Praise when they are quiet. Repeat process. They will eventually understand what you want. And when they are looking out the window at the jogger running by (or doing whatever triggers them to bark) and the second...and i mean the second, you notice that your dog sees the trigger and remains quiet...shower with praise and use a word such as "quiet" and praise. That will teach them to obey before they start to bark as opposed to stopping when corrected.