I made hand cream recently and so needed to get my little jam jars squeaky clean. I learnt how to do this a year or so ago when I was making a batch of pickle. I'm happy to say it's very easy to do.
Wash out your jars well (I got these in the supermarket with jam in them and when we'd eaten the jam decided they were well too cute to get rid of - recycling at home!).
Mine went through the dishwasher (lids too).
Then pre-heat oven on a low setting. I used 100 degrees C. Don't be tempted to use a high heat because you risk breaking the glass. Rinse jars, making sure they get wet everywhere inside. Pour out remaining water. Pop them in the oven and leave them there to dry out. Then switch of the oven and leave them there till cool.
The lids can be tricky to get right in the oven, as some have a plastic seal which can melt and mess everything up (speaking from experience!). To get round that I now pop them in a sauce pan of water and bring to the boil. Let the water boil for a minute or two and then leave to cool.