When Did Japan Gain Independence?

The country of Japan has never been under the rule of any other nation, therefore it never had to gain its independence from any other nation.