Before you get married in Japan, will you have a valid visa (work visa, for example)?
1. If so, you yourself can leave for a maximum of 1 year before it becomes invalid. Japan calls this having a "special re-entry permit". There is nothing fancy to sign, but you do have to declare what you're doing at the airport during immigration. I believe all you fill out is a simple disembarkation card. This applies to any valid visa, I believe.
2. If you plan to stay more than a year, you can without losing the visa, as long as you apply officially for what Japan confusingly calls a "re-entry permit". Yeah, love the difference in language being almost no difference! Fill this out, and you can stay a maximum of 5 years outside Japan before it's invalid. Used to be only 3 years. Of course, if you have some sort of emergency (not just a desire to stay longer), you can apply outside Japan for an extension, and I think it's only for a year more.
The link Mike Cash gave you is from a company that copied/pasted from
this site, which offers far more information. If you are in doubt, just have your wife contact immigration. DON'T go through a long description of what you are doing. Just ask how long you can stay outside Japan on a spouse visa, and what paperwork you need to fill out. They'll ask you if you plan to stay less than/more than a year for the reasons I've just given.
Keep in mind that you're not going to get that spousal visa overnight. Getting married is a 10-minute process at city hall near where you reside. You'll need to buy a license at that time if you want to apply for a spousal visa. Otherwise, buying the marriage license is entirely optional, believe it or not. There is likely to be special paperwork you need to fill out to declare you are currently single when you go to register your marriage, so check with your country's embassy to learn what that is.