An IMF study titled "Japanese Foreign Direct Investment and Regional Trade" details Japan's investment abroad since the early 1980's. The most noticeable fact that the study turns up is that 'outflows have exceeded inflows by more than a factor of 10"...I think that is at least in part attributable to the closed nature of Japan's economy which has only recently begun to open up to foreign investment. Another factor to be considered is that Japan's exports had been generating so much capital that there was little need for foreign investment to fund capital expenditures.
Also noted in the study is the fact that "By the late 1980s, Japan was investing more abroad than any other country in the world, with its FDI peaking at $67.5 billion (around 2.5 percent of GDP) in 1989"...and then the authors state that "This boom in Japanese FDI ended abruptly in the early 1990s when the asset-price bubble burst." So I feel safe in concluding that a substantial portion of the capital exported abroad came directly out of bank loans against real estate holdings. The study seems to support this as it states that "annual outflows declined steadily, both in absolute terms and relative to GDP and fixed investment, as the sharp decline in asset prices in 1990, which led to severe balance sheet difficulties for many businesses and banks, triggered a deep and protracted economic slump." A question I have is whether the returns on the foreign investments were sufficient to cover the cost of the bank capital...I don't have that data ready to hand.
As to where the capital was going, apparently "Japanese companies sharply increased their investment in North America in the 1980s"..."the United States alone received 50 percent of total Japanese FDI"..."whereas developing countries (including those in Asia) saw their share drop from 50 percent to about 25 percent." Further, the study concludes that "During this period, Japanese overseas investment in the tertiary sectors—including finance, insurance, transport, and real estate—grew significantly, while the share of FDI in manufacturing and mining declined." Essentially, Japan at this point was exporting its real estate bubble to the US; as was greatly discussed at the time with absurd prices being paid by Japanese companies for golf courses, certain office buildings, and other "trophy" properties.
In recent years the trend in FDI is described to the effect that "The share of Japanese FDI received by developing countries has returned to the levels seen in the early 1980s—and the share received by Asian countries within this total has increased substantially. At the same time, FDI flows to industrial countries—particularly the United States —have decreased. The decline of Japanese investment in the United States coincided with the decline in Japanese investment in services, particularly real estate, while the corresponding increase in FDI outflows to other countries in Asia has led to increased Japanese foreign investment in manufacturing, particularly chemical products and machinery." It would appear that recent developments reflect a more measured approach to investing in assets that will consistently generate positive returns. I would say that investment in auto plants in the US has certainly proved to be a winner, as this defused protectionist sentiment in the US, and likely resulted in a lower cost of labor relative to Japanese workers, and has not resulted in any reported declines in auto quality measures for the Japanese auto makers.
The study authors conclude that "Japanese firms are diversifying the location of their production and moving to other countries those parts of their operations in which they are losing comparative advantage." They don't detail what sectors Japan might be losing its comparative advantage in, but it seems reasonable to suppose that the sectors in question are those that China has gained massive shares of in recent years. Therefore, investing overseas seems a rational response to the competition of China and other lower cost countries in Asia. In addition, building operations in China which has a massive supply of labor which can be employed could be a good solution to the problem of significant shrinkage of Japan's workforce in the future due to demographic factors.
These trends could provide avenues for ameliorating tension between Japan and China regarding past conflicts. To the degree that the two countries become more economically interdependent, the odds of future military conflict decrease.