Thomas Down writes:
> C.V. Rajagopal wrote:
> > i have been experimenting with graphics printing in java under linux.
> >
> > when i press the print button in the print dialog box it gives an error
> > message like the following
> >
> > "Could not execute print commands[Ljava.lang.String:080a5470".
> >
> > but i could print it to a file
>
> Have you got the X printing library (/usr/X11R6/lib/libXp.so on my
> machine) installed? If not, try upgrading to the latest version of
> XFree86.
That's not the problem. JDK 1.1.5 tries to execute /bin/lp (I think) with
/bin/lp type arguments. You probably don't have /bin/lp, but rather /bin/lpr
with /bin/lpr type arguments. I think we fixed this (again) in 1.1.7 (it was
fixed in 1.1.2 or 3 -- it's one of the few places we have to tweak the .java
files during porting, since the code explicitly invokes /bin/lp with /bin/lp
type arguments). Or, you could install /bin/lp (if it's available for Linux),
or you could make a wrapper shell script that maps the arguments to the
corresponding lpr arguments and invokes lpr and name it /bin/lp.
Steve