title: lookupDefaultPrintService() doesn't return system default printer
body: <p><strong>Configuration:</strong></p>
  
  <ul>
  <li><strong>OS:</strong> CentOS release 5.4</li>
  <li><strong>Linux:</strong> 2.6.18-164.el5</li>
  <li><strong>Java:</strong> 1.7.0_25</li>
  </ul>
  
  <p>Hi,</p>
  
  <p>I'm having a hard time figuring out why the print dialog in my Java application uses the wrong printer as default.</p>
  
  <p><code>lpstat -d</code> returns 'printer_ip0', and the <code>printenv</code> command doesn't return the LPDEST or PRINTER variables (which, in my understanding, take precedence over the system default setting).</p>
  
  <p>Yet, every time I start a print job, the first printer in alphabetical order (printer1) is shown first, and <code>PrintServiceLookup.lookupDefaultPrintService().getName()</code> gives the same result.</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>When enabling IPP debugging (<code>System.setProperty("sun.print.ippdebug", "true")</code>), I get the following logs:</p>
  
  <pre><code>CUPSPrinter&gt;&gt; libfound false
  UnixPrintServiceLookup&gt;&gt; total# of printers = 2
  CUPSPrinter&gt;&gt; libfound false
  CUPSPrinter&gt;&gt; libfound false
  CUPSPrinter&gt;&gt; libfound false
  isRunning ? false
  CUPSPrinter&gt;&gt; libfound false
  </code></pre>
  
  <p>This lead me to the class <code>CUPSPrinter()</code> in the sun.print package, and in particular:</p>
  
  <pre><code>static {
     // load awt library to access native code
     java.security.AccessController.doPrivileged(
     new sun.security.action.LoadLibraryAction("awt"));
     libFound = initIDs();
     if (libFound) {
         cupsServer = getCupsServer();
         cupsPort = getCupsPort();
     }
  }
  </code></pre>
  
  <p>Unfortunately, it still doesn't tell me why it cannot access the native code.</p>
  
  <p>Any help would be greatly appreciated.</p>