The Japanese language is mostly a combination of 3 alphabets, and it can be transliterated to romaji (Latin script). There are various strategies, Revised Hepburn would be ideal here.
Example: ローマ字
→ rōmaji
Requirements:
- 100% pure Java library
- Compatible with GNU-GPLv3
Such a library will most probably need to embed a lot of data to guess the pronunciations correctly as often as possible.