Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 7 Dec 2002 04:58:57 +0100
From:      Boris Nikolaus <boris@cs.tu-berlin.de>
To:        freebsd-java@freebsd.org
Subject:   Printing problems using JDK1.4
Message-ID:  <20021207035857.GA16503@fiesta.cs.tu-berlin.de>

next in thread | raw e-mail | index | archive | help
Hi,

Both the linux-sun-jdk1.4 and the jdk1.4 (patchlevel 1) have problems
locating the printers of the system (e. g. when using
java.awt.print.PrinterJob.printDialog()). The reason is that java
tries to process the output of "lpc status" instead of
"lpc status all", but "lpc status" prints just an error message on
FreeBSD (at least on 4.7-STABLE).

Can you update the first elements of lpcFirstCom and lpcAllCom in
solaris/classes/sun/print/UnixPrintServiceLookup.java to use
"lpc status all" instead, so they will work correctly, please?
(Linux seems to handle "lpc status" and "lpc status all" identical,
so this should be not problem.)

Another way to deal with this problem would be to update the
lpc command so that "lpc status" will output the status of all
printers, but I would prefer to update Java to use the complete
lpc command.

BTW: In solaris/classes/sun/awt/print/AwtPrintControl.java,
solaris/classes/sun/print/UnixPrintService.java, and
solaris/classes/sun/print/UnixPrintServiceLookup.java, there are
calls to the programs sed, grep and awk without using a path. Does
this raise a security problem?

Best regards,
Boris Nikolaus

P.S.: I don't know if I should have submitted a PR for this problem,
but as jdk14 has not yet been released as a port I decided for the
mailing list.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-java" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021207035857.GA16503>