Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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?

share|improve this question
    
What versions of Windows did the old, and new computer have? –  kmarsh Sep 10 '09 at 13:54
    
The new one: Windows XP Professional. Unfortunately no one remembers the old one. –  asalamon74 Sep 15 '09 at 10:44

6 Answers 6

Please check the firewall settings and Antivirus if have any?

share|improve this answer

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.

share|improve this answer
    
Printer Spooler service is already started. –  asalamon74 Sep 21 '09 at 11:20

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

share|improve this answer
    
I've found no such settings. –  asalamon74 Sep 15 '09 at 10:43

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.

share|improve this answer

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.

share|improve this answer
    
The Java program is an applet. Is there a compatibility tab for applets? –  asalamon74 Nov 4 '10 at 8:37

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.