I have that same problem and whether or not its painful depends on the day. It happens in both my shoulders, although my left one which I injured in a skiing accident a couple years ago hurts and pops more. I tend to stay away from things like military/shoulder press that make it pop or put too much strain on it. When I was doing yoga, it made it difficult to do some of the postures, but the more I stretched them out the less they bothered me.
As far as the knees go, well anytime I do a squat type move or kneel down for something, even to tie my shoe, my knees pop. It's genetic for me, my g'pa had his knees replaced about 10 years ago. Nonetheless, it gets worse if I don't keep them exercised. Back when I was a kid I went to the doctor cause they were hurting pretty bad. They took x-rays and said the muscle tissue, etc was not holding the joint together properly and told me to start doing 10 leg lifts every mornign and night. That lasted all of a month before I stopped. But, every now and then I'll do them if my knees bother me too bad. Be careful when running and using the elipticals. While they are low-impact, the controlled movement can lock you into a movement that can get out of hand and torque or stress your knees. My knees actually hurt less if I run than when I use the elliptical. If all else fails, I jump on a bike.