Question 1:
i am trying to open cash drawer using java code with the help of batch file Serial2.bat.
Serial2.bat
MODE COM1 96,N,8,1
ECHO ^G>COM1
Java program in As/400
PUBLIC CLASS TEST {
PUBLIC STATIC VOID MAIN(STRING[] ARGS) THROWS EXCEPTION {
PROCESS P = RUNTIME.GETRUNTIME().EXEC(
"C:\WINDOWS\Serial2.bat");
P.WAITFOR();
}
}
while running this java program it is giving error java.io.IOException: the path is not found.
Is there any way to access the batch file in the C: drive using java program in AS/400.
Question2:
I have tried through CL language using STRPCCMD with the help of batch file serial2.bat it is opening the cash drawer but Dos prompt is displaying in AS/400 screen. But i don't want to display the dos prompt.
the aim is to open cash drawer without displaying the Dos prompt in AS/400 screen.
Start Free Trial