There are two ways to stop a puppy from jumping up or barking. The first, for jumping up, is to turn away and completely ignore the puppy until it stops, then turn around and praise the puppy. If it starts to jump up again, turn away again, until the puppy stops. Never give a puppy any attention, good or bad, while it is jumping up or that may make them do it more. But if the praise is given every time the puppy stops, it will soon get the idea that it won't get praised and patted until it stays on all four feet. This procedure will also work for older puppies and dogs that have gotten into this bad habit, as long as everyone does it that greets the dog. If a puppy is barking and gets scolded, it may consider this good as it gives them the attention they may be craving which may have started them barking to begin with. An owner can ignore the puppy when it is barking, and then praise it, and even give it a treat, when it stops. Again, the idea is that the puppy gets positive reinforcement for not doing the bad behavior.
One other technique to stop jumping up or barking is to actually teach the puppy to jump up or bark on command. Basically, if the puppy is coming toward you and you know it is going to jump up, be sure to say the command "Jump up" before the puppy does and give it a small treat. Then back up and say the command again and give it a treat again. Go through this a few times and then stop. If the puppy tries to jump up when not commanded, turn away and ignore the puppy. until it stops. Do this training two to three times a day and the puppy will soon understand that if it is not commanded to "Jump up", it does not get rewarded, so why jump up? Once the puppy understands this, it will not jump up unless commanded to do so. This is also true with barking or any other bad habits, to teach the puppy to do it on command so then the puppy won't do it otherwise. It takes patience but to stay very consistent and you will be rewarded with a well-trained dog.