File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java in General and the fly likes Doubt on Java Print API Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Doubt on Java Print API" Watch "Doubt on Java Print API" New topic

Doubt on Java Print API

Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 10031


I'm quite unsure as to why the following program returns an array length of 0 for the PrintServiceLookup??

SCJP 1.4, SCWCD 1.4 - Hints for you, Certified Scrum Master
Did a rm -R / to find out that I lost my entire Linux installation!
David Sharpe
Ranch Hand

Joined: Jun 15, 2009
Posts: 36
I've never used javax.print, and so my post is more for learning than helping, sorry.

I see the API says "If no services match, the array is zero-length." Where does it look for these services? Does lookupDefaultPrintService return anything?
I agree. Here's the link:
subject: Doubt on Java Print API
It's not a secret anymore!