Advice grately appreciated:
I can't for the life of me figure out why this doesn't work. From the command line, this works:
copy /B test.txt \\Hq2oakps2\p4103hp5k
And consulting this thread:
I wrote this code:
Process printJobProcess = null;
String printCommand = "cmd.exe /c copy /B " + tempPCLFile.getPath() + " \\\\Hq2oakps2\\p4103hp5k";
printJobProcess = Runtime.getRuntime().exec(printCommand);
printJobProcess.waitFor();
Which attempts to create this command:
cmd.exe /c copy /B C:\WINDOWS\TEMP\invoice-CAET20601B12946.pcl \\Hq2oakps2\p4103hp5k
But results in this error (I am -shamefully- having to work in Win98 at current; could that be an issue?):
java.io.IOException: CreateProcess: cmd.exe /c copy /B C:\WINDOWS\TEMP\invoice-CAET20601B12946.pcl \\Hq2oakps2\p4103hp5k error=0
at java.lang.Win32Process.create(Native Method)
at java.lang.Win32Process.<init>(Unknown Source)
at java.lang.Runtime.execInternal(Native Method)
at java.lang.Runtime.exec(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at com.apl.ppdi.appl.form.InvoicePrinter.printPCL(InvoicePrinter.java:214)
Advice grately appreciated
I can't for the life of me figure out why this doesn't work. From the command line, this works:
copy /B test.txt \\Hq2oakps2\p4103hp5k
And consulting this thread:
I wrote this code:
Process printJobProcess = null;
String printCommand = "cmd.exe /c copy /B " + tempPCLFile.getPath() + " \\\\Hq2oakps2\\p4103hp5k";
printJobProcess = Runtime.getRuntime().exec(printCommand);
printJobProcess.waitFor();
Which attempts to create this command:
cmd.exe /c copy /B C:\WINDOWS\TEMP\invoice-CAET20601B12946.pcl \\Hq2oakps2\p4103hp5k
But results in this error (I am -shamefully- having to work in Win98 at current; could that be an issue?):
java.io.IOException: CreateProcess: cmd.exe /c copy /B C:\WINDOWS\TEMP\invoice-CAET20601B12946.pcl \\Hq2oakps2\p4103hp5k error=0
at java.lang.Win32Process.create(Native Method)
at java.lang.Win32Process.<init>(Unknown Source)
at java.lang.Runtime.execInternal(Native Method)
at java.lang.Runtime.exec(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at com.apl.ppdi.appl.form.InvoicePrinter.printPCL(InvoicePrinter.java:214)
Advice grately appreciated