>>20
ttp://javagame.main.jp/index.html#minigame
にJavaで作ったサンプル例がある。

でもテキスト扱うのはPerlとかRubyの方が簡単だろうな。Javaだと無駄に難しそう。