Wait, wait, wait… You guys are missing some serious history here.
12th-15th century Okinawa. First off, they paid tribute to Japan during that timeframe intermittently, they were not "part" of Japan.
So these were 12th-15th century OKINAWAN castles.
Could have been brought by a failed Mongol invasion in 1296 (that's right, the only ones to win a land war in Asia failed to successfully take over little Okinawa.)
Could have been brought over by the Chinese, perhaps one of the, "Thirty Six Families," in 1392.
Or Siamese traders could have brought it over in 1404.
Maybe brought back from Okinawan trade ships being sent to Java in 1430, or Korea in 1431, or Malacca in 1463…