I've been to Japan and smoke there several times, when you buy cigarettes at the convenience stores, they'll ask you to press a button saying that you're over 20 but that's it. The cigarette vending machine wouldn't work because it needs a ID card only Japanese citizen has, also wouldn't try the stores where they sell liquor and cigarette together, they're usually more strict.
The bigger problem however, is the smoking etiquette difference. Depending on where you go, they have different places for smokers. Tokyo is a bit more relaxes and some have dedicated smoking rooms. Whereas Kyoto BANS smoking on the street, and when you walk on Kyoto's street it's obvious. So finding the right place where you're allowed to smoke is more important.