After a period of exposure to European interests, Japan secluded itself in the 1630s. George Lensen wrote in “The Russian Push Towards Japan”:
On the eve of her seclusion, Japan had begun to expand into southeast Asia and her countrymen had made their way to the Philippines, Annam, Siam, and Java, establishing flourishing colonies there. But her voluntary isolation had compelled Japan not only to restrict her territorial expansion, but to scuttle her naval efforts, and to discontinue the construction of big seagoing vessels.
How substantial were those Japanese colonies and how long did they last? Were they primarily trading posts or attempts at administering territory? Java is much farther south than the other locations cited, so why was it a destination?
Japanese quasi-colonialism in the 17th century mostly took place in Siam. There, the king had hired Japanese mercenaries to fight his battles, and these mercenaries threatened to take over the country from the early part of the century to 1630, until they were driven out. This was not a move that had the blessing of the Japanese government (from which the Japanese in Thailand were refugees), but more like the unchecked actions of the rogue Kwantung Army against China, centuries later.
Java and the Philippines at the time were respectively Dutch and Spanish colonies. The Japanese established trading posts, there, with the blessings of the respective governments. Ditto for Annam, which was then under “native,” not European rule.
As J. Asia’s link in his comment to the question points out, the Philippines’ case was a “hybrid” of the Siam case on one hand, and the other cases on the other hand. That is, at various times, the Japanese there were welcomed by the local authorities, were in rebellion against those authorities, and later were assimilated by the local people. Japanese were much more welcome in modern Indonesia where the ruling Dutch “co-opted” fierce Japanese mercenaries for their own defense.