7

I have a legacy Java program which handles a special card printer by sending binary data to the LPT1 port (no printer driver is involved, the Java program creates the binary stream).

The program was working correctly with the client's old computer. The Java program sent all the bytes to the printer and after sending the last byte the program was not blocked. It took an other minute to finish the card printing, but the user was able to continue the work with the program.

After changing the client's computer (but not the printer, or the Java program), the program does not finish the task till the card is ready, it is blocked until the last second.

It seems to me that LPT1 has a different behavior now than was before. Is it possible to change this in Windows? I've checked BIOS for parallel port settings: The parallel port is set to EPP+ECP (but also tried the other two options: Bidirectional, Output only). Maybe some kind of parallel port buffer is too small? How can I increase it?

asalamon74
  • 181
  • 4

6 Answers6

1

Please check the firewall settings and Antivirus if have any?

Gaurav Singh
  • 497
  • 2
  • 13
0

Another thing to try if possible: Right click the Java program, go to the Compatibility tab, and set the Compatibility mode to Windows 98/ME, or Windows 95. You might also try the NT4.0 and 2000 modes.

LawrenceC
  • 1,192
  • 6
  • 14
0

are you sending the data from the main (awt) thread? if yes, you could create a new thread and let it finish it's job in the background so that the ui becomes responsive again.

Simon
  • 101
0

Is the Print Spooler service started? It's a long shot I know, but this is exactly the kind of symptom you would get if not spooling.

Maximus Minimus
  • 8,937
  • 1
  • 22
  • 36
0

Check the settings for LPT1 in Device Manager. There should be something about spooling or direct printing as mh suggests.

Dennis Williamson
  • 60,515
  • 14
  • 113
  • 148
0

Here's a bit of a long shot (untested of course). Install a generic printer driver for the printer on LPT1. Then you should be able to configure the spool settings for the printer. Windows won't know that you're not using that particular driver but should obey the spool settings anyway.

John Gardeniers
  • 27,262
  • 12
  • 53
  • 108