You always hear claims of how, in an effort to avoid the necessity of a direct mainland invasion, the atomic bomb was used to encourage Japanese leadership to surrender (I understand this is it's own debate). Was the Japanese leadership and citizenry directly prepared to resist a mainland invasion? Were there any contingency plans for a guerrilla war, or a plan to militarize the "average joe's" of Japan, etc?
In the Spring of 1945 the Japanese Prime Minister established the Volunteer Corps, which included those between the ages of 12 and 65(Male) or 45(Female). This was initially established with a humanitarian purpose, being trained to deal with fires, first aid, evacuation, and food production.
Shortly after its creation, the Japanese cabinet subverted its purpose into that of a civil defense force (the Volunteer Fighting Corps), essentially creating militias for use if the Japanese mainland were invaded. Due to wartime requisition and supply issues, most of these "militias" were only lightly armed, to include in some cases such primitive weapons as spears and swords. Orders included not only defending the homeland, but creating a guerrilla conflict in the case of occupation.
As far as resolve, the U.S. military fully expected to deal with a hostile civilian populace in its planning for Operation Downfall, the invasion of mainland Japan. Estimates of between 100k and 1mil allied casualties were touted by planners, with most estimates placing between 100k and 500k. To this end, the U.S. military ordered 500k Purple Heart medals for expected casualties. To put that into perspective, those medals have been used in every conflict since, with over 100k of them remaining in national stockpiles.
For more on Operation Downfall: http://cgsc.cdmhost.com/cdm/ref/collection/p4013coll8/id/3387