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?

2
  • What versions of Windows did the old, and new computer have?
    – kmarsh
    Sep 10, 2009 at 13:54
  • The new one: Windows XP Professional. Unfortunately no one remembers the old one.
    – asalamon74
    Sep 15, 2009 at 10:44

6 Answers 6

1

Please check the firewall settings and Antivirus if have any?

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.

1
  • Printer Spooler service is already started.
    – asalamon74
    Sep 21, 2009 at 11:20
0

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

1
  • I've found no such settings.
    – asalamon74
    Sep 15, 2009 at 10:43
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.

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.

1
  • The Java program is an applet. Is there a compatibility tab for applets?
    – asalamon74
    Nov 4, 2010 at 8:37
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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .