I use a pedros chain cleaner. I spray WD40 on the chain. The WD40 is used as a solvent. I put simple green (a degreaser) in the cleaner. I run the chain through the cleaner. I then run it through water to get ride of the degreaser. I then dry the chain with a rag and grease it.
The remove the chain and mason jar trick would work every bit as well and I am sure the rag and solvent of choice would work fine too.
Here is a tip though. I have a cheap little chain gauge that I can put on the chain and it will tell me instantly if the chain is worn. That way I can replace the chain before it starts to wear down the cassette (or at least wear it down much).
Pat