While the submarines did not technically violate international maritime law as they didn't enter the 12-nautical-mile territorial waters near the areas in question, their sighting rattled Japanese officials and led the government to issue a warning that an order deploying the military to maintain maritime security could be issued if submarines enter Japan's territorial waters.
WSJ: Japan on Alert Over Unidentified Submarines