I am writing a command-line Ruby gem for CraftBukkit (of Minecraft fame).
So, CraftBukkit's .jar file functions as any command-line server interface should: it accepts user input and sends it to the server when the admin presses enter, while displaying a live feed of server events.
Executed in the command-line directly, then,
java -Xmx1024M -Xms1024M -jar craftbukkit.jar
functions perfectly. I need to execute that same command within my Ruby gem and accept user input in the same way. I am currently using %x{} like so:
%x{java -Xmx1024M -Xms1024M -jar craftbukkit.jar}
This functions reasonably well, as it displays output as it should and executes commands typed into the command line window. It does not, however, show user input as it is typed.
I need to fix this. What Ruby commands/frameworks can I use to make the java command function perfectly?
If possible, I would also like to be able to parse the output.
I am using Clamp to parse command line arguments, if that matters.