From owner-freebsd-java Sat Dec 7 2:48:29 2002 Delivered-To: freebsd-java@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 00AFF37B401 for ; Sat, 7 Dec 2002 02:48:27 -0800 (PST) Received: from relay1.cris.net (relay1.cris.net [212.110.128.64]) by mx1.FreeBSD.org (Postfix) with ESMTP id 09EBD43E9C for ; Sat, 7 Dec 2002 02:48:24 -0800 (PST) (envelope-from ml@phantom.cris.net) Received: from phantom.cris.net (root@phantom.cris.net [212.110.130.74]) by relay1.cris.net (8.12.6/8.12.6) with ESMTP id gB7Cjxip079312; Sat, 7 Dec 2002 12:46:00 GMT Received: (from ml@localhost) by phantom.cris.net (8.12.2/8.12.2) id gB7ArAQ5057181; Sat, 7 Dec 2002 12:53:10 +0200 (EET) (envelope-from ml) Date: Sat, 7 Dec 2002 12:53:10 +0200 From: Alexey Zelkin To: Boris Nikolaus Cc: freebsd-java@FreeBSD.ORG Subject: Re: Printing problems using JDK1.4 Message-ID: <20021207125310.A57166@phantom.cris.net> References: <20021207035857.GA16503@fiesta.cs.tu-berlin.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20021207035857.GA16503@fiesta.cs.tu-berlin.de>; from boris@cs.tu-berlin.de on Sat, Dec 07, 2002 at 04:58:57AM +0100 X-Operating-System: FreeBSD 4.5-STABLE i386 Sender: owner-freebsd-java@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Cool! Thanks for report! I'll review problem and commit fix to it. On Sat, Dec 07, 2002 at 04:58:57AM +0100, Boris Nikolaus wrote: > 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 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-java" in the body of the message