From owner-freebsd-java Fri Dec 6 20: 3:15 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 448D237B401 for ; Fri, 6 Dec 2002 20:03:14 -0800 (PST) Received: from mail.cs.tu-berlin.de (mail.cs.tu-berlin.de [130.149.17.13]) by mx1.FreeBSD.org (Postfix) with ESMTP id DEDB343E4A for ; Fri, 6 Dec 2002 20:03:12 -0800 (PST) (envelope-from boris@cs.tu-berlin.de) Received: from fiesta.cs.tu-berlin.de (daemon@fiesta.cs.tu-berlin.de [130.149.17.4]) by mail.cs.tu-berlin.de (8.9.3/8.9.3) with ESMTP id EAA11078 for ; Sat, 7 Dec 2002 04:58:58 +0100 (MET) Received: (from boris@localhost) by fiesta.cs.tu-berlin.de (8.11.6+Sun/8.9.3) id gB73wwG17260 for freebsd-java@freebsd.org; Sat, 7 Dec 2002 04:58:58 +0100 (MET) Date: Sat, 7 Dec 2002 04:58:57 +0100 From: Boris Nikolaus To: freebsd-java@freebsd.org Subject: Printing problems using JDK1.4 Message-ID: <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.4i 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 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