JDK-4988591 : Printing uses hardcoded paths to lpc and lpr
  • Type: Bug
  • Component: client-libs
  • Sub-Component: 2d
  • Affected Version: 1.4.0,1.4.2,6
  • Priority: P4
  • Status: Closed
  • Resolution: Won't Fix
  • OS: generic,linux
  • CPU: generic,x86
  • Submitted: 2004-02-04
  • Updated: 2024-06-11
  • Resolved: 2006-08-29
Related Reports
Duplicate :  
Relates :  
Description
Name: jg103975			Date: 02/04/2004


FULL PRODUCT VERSION :
java version "1.4.2_02"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_02-b03)
Java HotSpot(TM) Client VM (build 1.4.2_02-b03, mixed mode)


ADDITIONAL OS VERSION INFORMATION :
Linux 2.4.20-13.9

EXTRA RELEVANT SYSTEM CONFIGURATION :
in out network there is a custom printing solution installed and lpc/lpr are installed
in /usr/local/bin.
I don't have administrator access to create links in /usr/bin

A DESCRIPTION OF THE PROBLEM :
PrinterJob.printDialog() shows an error "No services found".
This is because the absolute paths to lpc/lpr are hard-coded.
If there is a reason not to look for these commands anywhere in the PATH,
the print dialog should at least allow to save the print job to a file.



REPRODUCIBILITY :
This bug can be reproduced always.
(Incident Review ID: 236916) 
======================================================================

Comments
EVALUATION Yep. We just can't know they are compatible. In any case the fact that we use lpc/lpr internally is an implementation detail and the trend is to use other APIS: PAPI, CUPS. Closing as will not fix.
29-08-2006

EVALUATION This is tricky because it assumes that JDK can assume that the custom implementations are compatible with the standard ones in both args, behaviour and output format. ###@###.### 2004-11-24 20:20:15 GMT
24-11-2004

WORK AROUND The "user" with the aid of a developer can supply his own javax.print.PrintServiceLookup class that is installed in the JRE and can handle the local configuration. This a moderate amount of non-trivial work however. ###@###.### 2004-11-24 20:20:15 GMT
24-11-2004