I don't know if this answer
at SO is useful to you. Otherwise, perhaps the REPL
package: it doesn't list Java but is, I understand, configurable. There is a Terminal
package as well. (ST cannot receive console-input by default.)
But I'm not a Java guy so perhaps someone else can offer more
"I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.