0

I am making POS which have comport printer. I created one text file and I want to give to the printer. I know the cmd command(print data.txt /d:com2) but how to give this command to CMD using java program?

0

1 Answer 1

0

If you do not care about stdin/stdout, them just

Runtime.getRuntime().exec("print data.txt /d:com2").waitFor();
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.