Just a quick one here, I think. I'm working on a little tool to merge changes into a document and then copy it over a communications port, and everything seems to be checking out except for that last step. Rather than worrying about streams and whatnot, I'm saving the file to the hard drive; from here, my plan has been to open the DOS prompt and take advantage of its "copy (filename) (port)" command to transfer the file. So in the end, the key line of Java should be something like
Runtime.getRuntime().exec("cmd.exe copy \"" + fileName + "\" LPT1");
My issue here is that the command prompt doesn't seem to want to open using Runtime.exec(). It
seems like cmd.exe should do the job -- tossing that into the run menu certainly opens the prompt -- and even just to be sure, I've tried using C:\WINDOWS\system32\cmd.exe explicitly, and both that at cmd.exe without any additional arguments. Strangely, though, the prompt isn't opening,
and I'm not getting an I/O error out of it as if I was sending in a bogus command.
So what am I doing wrong here? What do I have to do to open the DOS prompt?