NO. you need a visa even if you are only going to enter Japan for 12hours.
I think you will be granted visa on arrival for korea. No need to have prior application like Japan/US/Canada etc.
Edited: Sorry, i typed wrongly the 'don't'. So taken out dy.
IMHO, it works the other way around, since you can only do your visa within 3 months before you departure date, ticket price would be exorbitant by then in most cases, as most airlines do promotion for early purchase only nowadays.
Thing that people do not know is that, if you application got rejected without strong reason (like being blacklisted in either Malaysia or Japanese institutions such as financial, telco and etc). Then, you can always reapply unlimitedly until your visa application is approved. This would typically be true if the reason your that application was rejected was because your documents is not convincing enough (like bank statement, company letter, and etc).
You do not need confirmed flight ticket to apply for your visa, and doing an itinerary for visa application should take only 10 minutes of your time. Typically, I make it as generic as a trip to Japan could be. If you think that going to embassy to send/receive the application by yourself as a hassle, then pay some travel agency to do that for you. I would rather get my visa earlier, then getting stuck at the airport for not being given visa on arrival, which means not being able to meet a friend in your case.
*btw, I would recommend to apply visa for
holiday and transit, unless you don't have the financial proof to support your trip to Japan..
Technically that is not correct as there are actually a visa-exemption arrangements between the Malaysia and Japan.
Nevertheless, the word I would use here is that it is
strongly recommended to apply for visa before arrival.
http://www.my.emb-japan.go.jp/English/visit.html