开发者

Java "Printer is not accepting jobs" old Brother printers

开发者 https://www.devze.com 2023-01-13 03:10 出处:网络
I have client which has a problem with printing from JAVA applications, using old Brother printers. The exception he gets is \"Printer is not accepting jobs\".

I have client which has a problem with printing from JAVA applications, using old Brother printers. The exception he gets is "Printer is not accepting jobs".

Other applications (not java applications) manage to print using these printers. He switched to a new printer (also Brother), without changing the driver and then it worked.

The idea is that he cannot change all the printers, also he does not want to reinstall all of them, as he has a network of hundreds of computers and printers.

I have read on different forums that there is a bug in java version 1.5 and 1.6, but this application only works with java 1.5 or above... so he cannot switch to java 1.4 (开发者_Python百科with java 1.4, the printing worked).

Can you please help me somehow and give me some possible solution to this problem?


Found a workaround using byte code manipulation at http://copy-con.blogspot.com/2009/12/printer-is-not-accepting-job.html


It appears that this is this bug. Unfortunately, it is marked as low priority, and since nobody has bothered to vote for it, it is being put off.

This forum thread gives some useful background (reply #11) and a workaround (reply #9) that ignores the printer status when trying to print a file.

If you want this bug fixed in Java 7, there is still time to submit a patch.

EDIT

I was aware that someone disputed the workaround, but I didn't get my head around the problem. Whatever, it should be possible to develop a better version, either using the same approach or a different one. If subclassing and using reflection to tweak private state don't work, then you can download the Java 6 source code, fix the bug and rebuild.

I'm sure it would be nice if someone had a solution for you, but lets be realistic. This looks like a problem that affects very few people. IMO, your best chances of success are:

  • self help,
  • paying for an Oracle support contract, or
  • hiring an independent technical expert.

Of these, self help has the best chance of giving you a quick resolution ... assuming you have people with the skills for doing this kind of work in-house.

0

精彩评论

暂无评论...
验证码 换一张
取 消