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 :(得分:0)
If you do not care about stdin/stdout, them just
Runtime.getRuntime().exec("print data.txt /d:com2").waitFor();