In order to obtain the national flag, companies must be headquartered in Japan and their partners (unlimited partnership) and two thirds or more of their managing directors must be nationals.
"Article 1　Left ship toss Japanese ship
(1)　Ships belonging to the genus (2) owned by the Japanese government office or public office
(2)　Ships belonging to the genus (2) owned by the Japanese people
(3)　Established by Japanese law and law, all representatives of the company, and executive officers of the business.
(4)    All of the representatives of the corporations other than the getal corporations listed in the preceding item are established by the laws and regulations of Japan.
[...]
Article 3 Japanese vessels non-saleha unopened ports call at ports in Japan, goods and passengers in each port in Japan, but the law is not required. The patent of the Minister of Land, Infrastructure, Transport and Tourism [...]" (Ship Act (No. 46 of 1899), last amended June 13, 2014, Articles 1 and 3 [google translation])
Ship Act (No. 46 of 1899), last amended June 13, 2014, Articles 1 and 3
[<a href="https://elaws.e-gov.go.jp/document?lawid=132AC0000000046">Act</a>],[<a href="https://www.oecd.org/daf/inv/investment-policy/NTItransparencyENG.pdf">Other</a>]