Japan has donated a training vessel to Malaysia, as part of its effort to support improved security in the vital Straits of Malacca, on which it's economy is very highly dependent. Most of Japan's oil, and much of its exports, move through these straits. In the past, Japan has donated over $100 million to improve navigation and security in the straits, and has occasionally supplied aircraft and coast guard vessels for joint training. As important as the straits are to Japan, the Japanese don't want their navy to operate this far south for extended periods of time. So it's cheaper to help the local countries improve their naval security capabilities.