Also, please don't post the same question to more than one forum; see our explanation
here. I've deleted the other copy of this
thread you posted today.
Now, as to your question: what part do you need help with? Do you actually want to "create" this program, or are you actually asking for an already existing program? If you want to write it yourself, what part are you asking for help with? Parsing input? Running programs? Let us know what part you need help with.
If you want the thing all done already, there's no "CommandShell" class in the standard API, but there are things like BeanShell (use Google) which are exactly what you describe.