Question by Matthew: How do I use cmd commands in java?
I want to enter this in my java program:
“net user Matthew”
and have it executed like it would in command prompt.
Answer by Dan B
I think the command you are looking for is
I should add that I think this forks a new process rather than blocking and waiting for the result of the System.execute to return.
What do you think? Answer below!